aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer
diff options
context:
space:
mode:
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);
}