From fab6c210b37f1fa6b3e37a2583b18f8e4b5a4f12 Mon Sep 17 00:00:00 2001 From: Nikolaj Jensen Date: Tue, 27 Jun 2023 14:13:24 +0100 Subject: Design wrapper around CKW for easier writing Signed-off-by: Nikolaj Jensen Change-Id: I114cdedcaf05c6abde046741837eeb73b813aa9d Signed-off-by: Nikolaj Jensen Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/532180 Tested-by: bsgcomp Reviewed-by: Viet-Hoa Do Comments-Addressed: bsgcomp Signed-off-by: Nikolaj Jensen Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9921 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- compute_kernel_writer/prototype/src/Prototype.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'compute_kernel_writer/prototype/src/Prototype.h') diff --git a/compute_kernel_writer/prototype/src/Prototype.h b/compute_kernel_writer/prototype/src/Prototype.h index 72fa419fc2..05c7306e3a 100644 --- a/compute_kernel_writer/prototype/src/Prototype.h +++ b/compute_kernel_writer/prototype/src/Prototype.h @@ -2498,7 +2498,7 @@ public: virtual void op_else_header() = 0; - virtual void op_for_loop_header(const Operand &var_name, BinaryOp cond_op, const Operand &cond_value, AssignmentOp update_op, const Operand &update_value) = 0; + virtual void op_for_loop_header(const Operand &var_name, BinaryOp cond_op, const Operand &cond_value, const Operand &update_var, AssignmentOp update_op, const Operand &update_value) = 0; virtual void op_load_indirect(const TensorOperand &tensor, const Operand &dst, const Operand &x, const Operand &y_indirect, const Operand &z, const Operand &b = Operand("0", OperandType::ScalarInt32)) = 0; @@ -3654,9 +3654,6 @@ public: case UnaryFunction::Fabs: _data->code += "fabs("; break; - case UnaryFunction::IsGreaterEqual: - _data->code += "isgreaterequal("; - break; case UnaryFunction::Log: _data->code += "log("; break; @@ -3798,11 +3795,12 @@ public: _data->code += "else\n"; } - void op_for_loop_header(const Operand& var_name, BinaryOp cond_op, const Operand& cond_value_name, AssignmentOp update_op, const Operand& update_value_name) override + void op_for_loop_header(const Operand& var_name, BinaryOp cond_op, const Operand& cond_value_name, const Operand &update_var_name, AssignmentOp update_op, const Operand& update_value_name) override { OperandUnpacker operands(_data->tiles, _data->arguments); const IVectorTile *var = operands.unpack(var_name); const IVectorTile *cond_value = operands.unpack(cond_value_name); + const IVectorTile *update_var = operands.unpack(update_var_name); const IVectorTile *update_value = operands.unpack(update_value_name); const int32_t dst_w = var->format().w; @@ -3818,7 +3816,7 @@ public: _data->code += " "; _data->code += to_string(cond_op); _data->code += " " + cond_value->scalar(0, 0).str + "; "; - _data->code += var->scalar(0, 0).str; + _data->code += update_var->scalar(0, 0).str; _data->code += " "; _data->code += to_string(update_op); _data->code += " " + update_value->scalar(0, 0).str + ")"; -- cgit v1.2.1