aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-03-08 19:09:19 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commit1562be3e8a449360a90af75f6f1481a30d41be75 (patch)
tree3180551f4c8595ae5c9630694754f3b1f8b493b1 /arm_compute/runtime/NEON/functions
parent684cb0f29d23fbe418e5e5347234abf9eccef363 (diff)
downloadComputeLibrary-1562be3e8a449360a90af75f6f1481a30d41be75.tar.gz
COMPMID-998: Release unused trainable parameters.
Change-Id: I361a520f34080016a25bc86e1e6789777c5152c1 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124432 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/NEON/functions')
-rw-r--r--arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h10
-rw-r--r--arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h11
-rw-r--r--arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h11
-rw-r--r--arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h9
4 files changed, 39 insertions, 2 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
index f5805f5ad1..fe65ac1a43 100644
--- a/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEDepthwiseConvolutionLayer.h
@@ -97,6 +97,14 @@ class NEDepthwiseConvolutionLayer : public IFunction
public:
/** Default constructor */
NEDepthwiseConvolutionLayer();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEDepthwiseConvolutionLayer(const NEDepthwiseConvolutionLayer &) = delete;
+ /** Default move constructor */
+ NEDepthwiseConvolutionLayer(NEDepthwiseConvolutionLayer &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEDepthwiseConvolutionLayer &operator=(const NEDepthwiseConvolutionLayer &) = delete;
+ /** Default move assignment operator */
+ NEDepthwiseConvolutionLayer &operator=(NEDepthwiseConvolutionLayer &&) = default;
/** Initialize the function's source, destination, weights and convolution information.
*
* @param[in, out] input Source tensor. Data type supported: QASYMM8/F32. (Written to only for border filling).
@@ -123,7 +131,9 @@ private:
Tensor _weights_reshaped;
Tensor _v2mm_output;
Tensor _output_reshaped;
+ bool _is_first_run;
bool _is_quantized;
+ const ITensor *_original_weights;
};
}
#endif /* __ARM_COMPUTE_NEDEPTHWISECONVOLUTION_H__ */ \ No newline at end of file
diff --git a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
index 9bc8d21fc4..071eecc3f7 100644
--- a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
@@ -94,6 +94,14 @@ class NEFullyConnectedLayer : public IFunction
public:
/** Constructor */
NEFullyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEFullyConnectedLayer(const NEFullyConnectedLayer &) = delete;
+ /** Default move constructor */
+ NEFullyConnectedLayer(NEFullyConnectedLayer &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEFullyConnectedLayer &operator=(const NEFullyConnectedLayer &) = delete;
+ /** Default move assignment operator */
+ NEFullyConnectedLayer &operator=(NEFullyConnectedLayer &&) = default;
/** Set the input and output tensors.
*
* @param[in] input Source tensor. Data type supported: QS8/QS16/F32.
@@ -134,6 +142,7 @@ private:
bool _is_batched_fc_layer;
bool _linearize_input;
bool _accumulate_biases;
+ const ITensor *_original_weights;
};
-}
+} // namespace arm_compute
#endif /* __ARM_COMPUTE_NEFULLYCONNECTEDLAYER_H__ */
diff --git a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
index 43e9304414..e733fec4b6 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMMConvolutionLayer.h
@@ -101,7 +101,14 @@ class NEGEMMConvolutionLayer : public IFunction
public:
/** Constructor */
NEGEMMConvolutionLayer(const std::shared_ptr<IMemoryManager> &memory_manager = nullptr);
-
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEGEMMConvolutionLayer(const NEGEMMConvolutionLayer &) = delete;
+ /** Default move constructor */
+ NEGEMMConvolutionLayer(NEGEMMConvolutionLayer &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEGEMMConvolutionLayer &operator=(const NEGEMMConvolutionLayer &) = delete;
+ /** Default move assignment operator */
+ NEGEMMConvolutionLayer &operator=(NEGEMMConvolutionLayer &&) = default;
/** Set the input and output tensors.
*
* @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM],
@@ -165,6 +172,8 @@ private:
NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPoint _gemmlowp_output_stage;
NECol2ImKernel _output_col2im_kernel;
+ const ITensor *_original_weights;
+
Tensor _input_im2col_reshaped;
Tensor _input_interleaved_reshaped;
Tensor _weights_reshaped;
diff --git a/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h b/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h
index e07f09c588..18cd27414e 100644
--- a/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h
+++ b/arm_compute/runtime/NEON/functions/NELocallyConnectedLayer.h
@@ -53,6 +53,14 @@ class NELocallyConnectedLayer : public IFunction
public:
/** Default constructor */
NELocallyConnectedLayer(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELocallyConnectedLayer(const NELocallyConnectedLayer &) = delete;
+ /** Default move constructor */
+ NELocallyConnectedLayer(NELocallyConnectedLayer &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NELocallyConnectedLayer &operator=(const NELocallyConnectedLayer &) = delete;
+ /** Default move assignment operator */
+ NELocallyConnectedLayer &operator=(NELocallyConnectedLayer &&) = default;
/** Set the input and output tensors.
*
* @param[in] input Source tensor. 3 lower dimensions represent a single input [width, height, IFM],
@@ -93,6 +101,7 @@ private:
Tensor _weights_reshaped;
Tensor _gemm_output;
bool _is_first_run;
+ const ITensor *_original_weights;
};
}
#endif /* __ARM_COMPUTE_NELOCALLYCONNECTEDLAYER_H__ */