aboutsummaryrefslogtreecommitdiff
path: root/arm_compute
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2021-05-25 13:12:47 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2021-05-25 15:26:33 +0000
commit8b83d4684249bb96e27f95e11cf8f38a1c33b82b (patch)
treea150f1266e6cb17540251233b02465a76426d329 /arm_compute
parentbf1dbd85cfccc9ad4a351ae403218b83e3dc87a6 (diff)
downloadComputeLibrary-8b83d4684249bb96e27f95e11cf8f38a1c33b82b.tar.gz
Remove used auxilary tensors from ClGemm's tensor pack
When the used auxilary tensors are kept in the tensor pack, the pointers in the tensor pack can point memory space that has been already freed. In some cases, this leads crashes or unpredictable behaviour. Resolves: COMPMID-4536 Change-Id: I4cc83310dfe084d477a5f9bece216228c3edb172 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5710 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r--arm_compute/core/ITensorPack.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arm_compute/core/ITensorPack.h b/arm_compute/core/ITensorPack.h
index 2f41d4d51e..17b7241862 100644
--- a/arm_compute/core/ITensorPack.h
+++ b/arm_compute/core/ITensorPack.h
@@ -95,6 +95,11 @@ public:
* @return The pointer to the tensor if exist and is const else nullptr
*/
const ITensor *get_const_tensor(int id) const;
+ /** Remove the tensor stored with the given id
+ *
+ * @param[in] id ID of tensor to remove
+ */
+ void remove_tensor(int id);
/** Pack size accessor
*
* @return Number of tensors registered to the pack