diff options
author | Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2024-02-29 17:00:07 +0000 |
---|---|---|
committer | Suhail M <MohammedSuhail.Munshi@arm.com> | 2024-03-21 15:58:46 +0000 |
commit | 8609ca08556d4d928e290b963c71e731ac24bd52 (patch) | |
tree | 10a9e80dc589dab32dc3c8121b365b0288cbebcf /utils | |
parent | 36a75dafdbe6d6a3a6f50bd075fe01f5b7dace38 (diff) | |
download | ComputeLibrary-8609ca08556d4d928e290b963c71e731ac24bd52.tar.gz |
Add skeleton for CLScatter op, reference and tests
- Adds dataset for tests
- Adds skeleton for function, operator, reference and tests
Resolves: [COMPMID-6889]
Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>
Change-Id: I7e57e8b4577fef6aa7421e672894c249cad6c5fa
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11234
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TypePrinter.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 41ac11801f..2d106d849a 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -49,6 +49,7 @@ #include "arm_compute/function_info/FullyConnectedLayerInfo.h" #include "arm_compute/function_info/GEMMInfo.h" #include "arm_compute/function_info/MatMulInfo.h" +#include "arm_compute/function_info/ScatterInfo.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/CLTypes.h" #include "arm_compute/runtime/common/LSTMParams.h" @@ -3618,6 +3619,77 @@ inline std::string to_string(const arm_compute::CpuMatMulSettings &settings) return str.str(); } +/** Formatted output of the scatter function type. + * + * @param[out] os Output stream. + * @param[in] function arm_compute::ScatterFunction type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const ScatterFunction &function) +{ + switch (function) + { + case ScatterFunction::Update: + os << "UPDATE"; + break; + case ScatterFunction::Add: + os << "ADD"; + break; + case ScatterFunction::Sub: + os << "SUB"; + break; + case ScatterFunction::Max: + os << "MAX"; + break; + case ScatterFunction::Min: + os << "MIN"; + break; + default: + ARM_COMPUTE_ERROR("NOT_SUPPORTED!"); + } + return os; +} +/** Formatted output of the arm_compute::ScatterFunction type. + * + * @param[in] func arm_compute::ScatterFunction type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const arm_compute::ScatterFunction &func) +{ + std::stringstream str; + str << func; + return str.str(); +} +/** Formatted output of the arm_compute::ScatterInfo type. + * + * @param[out] os Output stream. + * @param[in] info arm_compute::ScatterInfo type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const arm_compute::ScatterInfo &info) +{ + os << "ScatterInfo=" + << "[" + << "Function=" << info.func << ", " + << "InitialiseZero=" << info.zero_initialization << "] "; + return os; +} +/** Formatted output of the arm_compute::ScatterInfo type. + * + * @param[in] info arm_compute::ScatterInfo type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const arm_compute::ScatterInfo &info) +{ + std::stringstream str; + str << info; + return str.str(); +} + } // namespace arm_compute #endif // ACL_UTILS_TYPEPRINTER_H |