diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2021-02-03 10:32:59 +0000 |
---|---|---|
committer | Sang-Hoon Park <sang-hoon.park@arm.com> | 2021-03-08 17:00:45 +0000 |
commit | 668ccdcfb81bfab3a2d44cd1ddd956e83a2dfb09 (patch) | |
tree | d139e1a770bcfc182f1aef38a1b908d634f9bb1c /arm_compute/core/ITensorInfo.h | |
parent | 201e0fee596dafcf9c869a550fae29779aad2394 (diff) | |
download | ComputeLibrary-668ccdcfb81bfab3a2d44cd1ddd956e83a2dfb09.tar.gz |
Add dynamic tensor support to CpuElementwise
The kernels and operators for binary and unary operations
are now capable of being configured with dynamic shapes and
computing windows at run-time.
Additionally, changing arguments' names is done
for consistency.
Partially Implements: COMPMID-4127
Change-Id: I48e5038692db667dec7cb2b2906fe5683214fe19
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4973
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez Tello <pablo.tello@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/ITensorInfo.h')
-rw-r--r-- | arm_compute/core/ITensorInfo.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/arm_compute/core/ITensorInfo.h b/arm_compute/core/ITensorInfo.h index 9ddafce7c0..0171e31086 100644 --- a/arm_compute/core/ITensorInfo.h +++ b/arm_compute/core/ITensorInfo.h @@ -41,8 +41,24 @@ class ITensorInfo : public misc::ICloneable<ITensorInfo> { public: using TensorDimsState = Coordinates; - -public: + /** Get the value representing dynamic dimension state + * + * @return Value representing dynamic dimension state + * + */ + static constexpr int32_t get_dynamic_state_value() + { + return _dynamic_dimension; + } + /** Get the value representing static dimension state + * + * @return Value representing static dimension state + * + */ + static constexpr int32_t get_static_state_value() + { + return _static_dimension; + } /** Default virtual destructor */ virtual ~ITensorInfo() = default; /** Set the data type to the specified value. @@ -297,6 +313,10 @@ public: return std::pair<TensorShape, ValidRegion>(bc_shape, bc_valid_region); } + +private: + static constexpr int32_t _dynamic_dimension = -1; + static constexpr int32_t _static_dimension = 0; }; } // namespace arm_compute #endif /*ARM_COMPUTE_TENSORINFO_H */ |