aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer
diff options
context:
space:
mode:
authorAdnan AlSinan <adnan.alsinan@arm.com>2023-08-21 13:54:27 +0100
committerAdnan AlSinan <adnan.alsinan@arm.com>2023-08-31 15:10:37 +0000
commit2e6d659267d10d6f46f89aac91b52f6b7c211316 (patch)
treebc27ecc9d3eabb533b939c8872e1256eeb6b9876 /compute_kernel_writer
parentd5f9a1cf9f0340f3e6bf9ff00156fc2adb1fdca9 (diff)
downloadComputeLibrary-2e6d659267d10d6f46f89aac91b52f6b7c211316.tar.gz
Port ClTemplatePool2d to ckw
- Fixes a bug when using FP16 constant in some cases. - Adds op_write_raw_code to handle some special cases. - Ports MxN pooling 2d layer into ckw. - Adds unary function 'negate' to ckw. - Updates pool2d validation tests to include store op. Resovles COMPMID-6263 Signed-off-by: Adnan AlSinan <adnan.alsinan@arm.com> Change-Id: If8c683761fead79bd519aef28cc65de78d3ec629 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10172 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer')
-rw-r--r--compute_kernel_writer/prototype/include/ckw/types/Operators.h1
-rw-r--r--compute_kernel_writer/prototype/src/Prototype.h2
-rw-r--r--compute_kernel_writer/prototype/src/TileOperand.cpp3
3 files changed, 6 insertions, 0 deletions
diff --git a/compute_kernel_writer/prototype/include/ckw/types/Operators.h b/compute_kernel_writer/prototype/include/ckw/types/Operators.h
index 14a88c91b4..43241170a5 100644
--- a/compute_kernel_writer/prototype/include/ckw/types/Operators.h
+++ b/compute_kernel_writer/prototype/include/ckw/types/Operators.h
@@ -34,6 +34,7 @@ enum class UnaryOp : int32_t
{
LogicalNot = 0x0000, // !
BitwiseNot = 0x0001, // ~
+ Negate = 0x0002, // -
};
/* Binary operations
diff --git a/compute_kernel_writer/prototype/src/Prototype.h b/compute_kernel_writer/prototype/src/Prototype.h
index 88d6e898e4..eb9d7198a9 100644
--- a/compute_kernel_writer/prototype/src/Prototype.h
+++ b/compute_kernel_writer/prototype/src/Prototype.h
@@ -1583,6 +1583,8 @@ inline std::string to_string(UnaryOp op)
return "!";
case UnaryOp::BitwiseNot:
return "~";
+ case UnaryOp::Negate:
+ return "-";
default:
assert(false);
return "";
diff --git a/compute_kernel_writer/prototype/src/TileOperand.cpp b/compute_kernel_writer/prototype/src/TileOperand.cpp
index bf6a15b9df..0eb2ca6a64 100644
--- a/compute_kernel_writer/prototype/src/TileOperand.cpp
+++ b/compute_kernel_writer/prototype/src/TileOperand.cpp
@@ -85,6 +85,9 @@ prototype::Operand TileOperand::create_impl_operand(prototype::IGpuKernelWriter
case DataType::Fp32:
return prototype::Operand(_value[0][0], prototype::OperandType::ScalarFp32);
+ case DataType::Fp16:
+ return prototype::Operand(_value[0][0], prototype::OperandType::ScalarFp16);
+
default:
CKW_ASSERT(false);
}