IVGCVSW-4565 TENSOR_BOOL8 data type not supported in AndroidNN Driver
* Enabled Boolean and Int32 data types in Reference Comparison inputs
* Added decoder for Boolean data type
* Refactored ClGreaterWorkload to work with any data type
* Refactored NeonGreaterWorkload to work with any data type
!android-nn-driver:2902
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I92772810b744b388831c9dca0119ebf8cb7a447e
diff --git a/src/backends/cl/workloads/ClGreaterWorkload.cpp b/src/backends/cl/workloads/ClGreaterWorkload.cpp
index b086122..2051cc3 100644
--- a/src/backends/cl/workloads/ClGreaterWorkload.cpp
+++ b/src/backends/cl/workloads/ClGreaterWorkload.cpp
@@ -38,10 +38,8 @@
return aclStatus;
}
-template<DataType T>
-ClGreaterWorkload<T>::ClGreaterWorkload(const GreaterQueueDescriptor& descriptor,
- const WorkloadInfo& info)
- : MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>(descriptor, info)
+ClGreaterWorkload::ClGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info)
+ : BaseWorkload<GreaterQueueDescriptor>(descriptor, info)
{
m_Data.ValidateInputsOutputs("ClGreaterWorkload", 2, 1);
@@ -52,14 +50,10 @@
m_GreaterLayer.configure(&input0, &input1, &output, arm_compute::ComparisonOperation::Greater);
}
-template<DataType T>
-void ClGreaterWorkload<T>::Execute() const
+void ClGreaterWorkload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT_CL("ClGreaterWorkload_Execute");
RunClFunction(m_GreaterLayer, CHECK_LOCATION());
}
-template class ClGreaterWorkload<DataType::Float32>;
-template class ClGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn
diff --git a/src/backends/cl/workloads/ClGreaterWorkload.hpp b/src/backends/cl/workloads/ClGreaterWorkload.hpp
index 862e168..9b2a171 100644
--- a/src/backends/cl/workloads/ClGreaterWorkload.hpp
+++ b/src/backends/cl/workloads/ClGreaterWorkload.hpp
@@ -16,19 +16,14 @@
const TensorInfo& input1,
const TensorInfo& output);
-template<DataType T>
-class ClGreaterWorkload : public MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>
+class ClGreaterWorkload : public BaseWorkload<GreaterQueueDescriptor>
{
public:
ClGreaterWorkload(const GreaterQueueDescriptor& descriptor, const WorkloadInfo& info);
void Execute() const override;
private:
- using MultiTypedWorkload<GreaterQueueDescriptor, T, DataType::Boolean>::m_Data;
mutable arm_compute::CLComparison m_GreaterLayer;
};
-using ClGreaterFloat32Workload = ClGreaterWorkload<DataType::Float32>;
-using ClGreaterUint8Workload = ClGreaterWorkload<DataType::QAsymmU8>;
-
} //namespace armnn