diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2022-12-06 20:48:31 +0000 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2022-12-09 14:05:08 +0000 |
commit | 1dc6ff1749ae8e9fbf0b99308d6ebb65be10cc76 (patch) | |
tree | 79588a3305127bf43dcf64e0b55a32dbac96c437 /utils/TypePrinter.h | |
parent | df6a3b05842a98702437347ca269138ccd55f852 (diff) | |
download | ComputeLibrary-1dc6ff1749ae8e9fbf0b99308d6ebb65be10cc76.tar.gz |
Implement Cast operator in dynamic fusion
The operator is migrated into dynamic fusion for all data types supported
Resolves: COMPMID-5693
Change-Id: I3c550d3d1cd04570f453beae678c3f60d4cb1a73
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8755
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils/TypePrinter.h')
-rw-r--r-- | utils/TypePrinter.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 0122229ed2..515e568657 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -39,6 +39,7 @@ #include "arm_compute/core/experimental/IPostOp.h" #include "arm_compute/core/experimental/PostOps.h" #include "arm_compute/dynamic_fusion/sketch/OperatorAttributes.h" +#include "arm_compute/dynamic_fusion/sketch/attributes/CastAttributes.h" #include "arm_compute/dynamic_fusion/sketch/attributes/DepthwiseConv2dAttributes.h" #include "arm_compute/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/CLTypes.h" @@ -3433,6 +3434,35 @@ inline std::string to_string(const experimental::dynamic_fusion::Conv2dAttribute return str.str(); } +/** Formatted output of the arm_compute::experimental::dynamic_fusion::CastAttributes type. + * + * @param[out] os Output stream. + * @param[in] cast_attr arm_compute::experimental::dynamic_fusion::CastAttributes type to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const experimental::dynamic_fusion::CastAttributes &cast_attr) +{ + os << "CastAttributes=" + << "[" + << "Data Type=" << cast_attr.data_type() << ", " + << "Convert Policy=" << cast_attr.convert_policy() << "]"; + + return os; +} +/** Formatted output of the arm_compute::experimental::dynamic_fusion::CastAttributes type. + * + * @param[in] cast_attr arm_compute::experimental::dynamic_fusion::CastAttributes type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const experimental::dynamic_fusion::CastAttributes &cast_attr) +{ + std::stringstream str; + str << cast_attr; + return str.str(); +} + /** Formatted output of the arm_compute::experimental::dynamic_fusion::DepthwiseConv2dAttributes type. * * @param[out] os Output stream. |