From 75920b1b5993fc653f9935a96f7327ddf14875fb Mon Sep 17 00:00:00 2001 From: Kevin Petit Date: Tue, 23 Jan 2024 19:12:14 +0000 Subject: pseudocode: fix name mismatches with operator arguments in the XML Change either the name in the pseudocode or XML to what feels more "natural" or in line with other related names. Change-Id: Ic12a0418a80642c548c288b6ba26a4603b94fedc Signed-off-by: Kevin Petit --- pseudocode/operators/LOGICAL_NOT.tosac | 2 +- pseudocode/operators/MAX_POOL2D.tosac | 2 +- pseudocode/operators/RECIPROCAL.tosac | 2 +- pseudocode/operators/RSQRT.tosac | 2 +- pseudocode/operators/VARIABLE_READ.tosac | 2 +- tosa.xml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pseudocode/operators/LOGICAL_NOT.tosac b/pseudocode/operators/LOGICAL_NOT.tosac index b07e668..0518b8f 100644 --- a/pseudocode/operators/LOGICAL_NOT.tosac +++ b/pseudocode/operators/LOGICAL_NOT.tosac @@ -8,7 +8,7 @@ // by a licensing agreement from ARM Limited. for_each(index in shape) { - in_out_t value1 = tensor_read(input1, shape1, index); + in_out_t value1 = tensor_read(input1, shape, index); in_out_t result = !value1; tensor_write(output, shape, index, result); } diff --git a/pseudocode/operators/MAX_POOL2D.tosac b/pseudocode/operators/MAX_POOL2D.tosac index a33b80a..eea5a70 100644 --- a/pseudocode/operators/MAX_POOL2D.tosac +++ b/pseudocode/operators/MAX_POOL2D.tosac @@ -17,7 +17,7 @@ ERROR_IF(pad_top >= kernel_y || pad_bottom >= kernel_y); ERROR_IF(OH != idiv_check(IH + pad_top + pad_bottom - kernel_y, stride_y) + 1); ERROR_IF(OW != idiv_check(IW + pad_left + pad_right - kernel_x, stride_x) + 1); -for_each(0 <= n < N, 0 <= oy < H, 0 <= ox < W, 0 <= c < C ) { +for_each(0 <= n < N, 0 <= oy < OH, 0 <= ox < OW, 0 <= c < C ) { in_out_t acc = minimum_value; index_t iy = oy * stride_y - pad_top; index_t ix = ox * stride_x - pad_left; diff --git a/pseudocode/operators/RECIPROCAL.tosac b/pseudocode/operators/RECIPROCAL.tosac index 9bc086b..986462c 100644 --- a/pseudocode/operators/RECIPROCAL.tosac +++ b/pseudocode/operators/RECIPROCAL.tosac @@ -8,7 +8,7 @@ // by a licensing agreement from ARM Limited. for_each(index in shape) { - in_out_t value1 = tensor_read(input1, shape1, index); + in_out_t value1 = tensor_read(input1, shape, index); in_out_t result = 1.0 / value1; tensor_write(output, shape, index, result); } diff --git a/pseudocode/operators/RSQRT.tosac b/pseudocode/operators/RSQRT.tosac index 15d884a..add9f62 100644 --- a/pseudocode/operators/RSQRT.tosac +++ b/pseudocode/operators/RSQRT.tosac @@ -8,7 +8,7 @@ // by a licensing agreement from ARM Limited. for_each(index in shape) { - in_out_t value1 = tensor_read(input1, shape1, index); + in_out_t value1 = tensor_read(input1, shape, index); in_out_t result; if (value1 < 0) { result = NaN; diff --git a/pseudocode/operators/VARIABLE_READ.tosac b/pseudocode/operators/VARIABLE_READ.tosac index c2e0e38..74b5905 100644 --- a/pseudocode/operators/VARIABLE_READ.tosac +++ b/pseudocode/operators/VARIABLE_READ.tosac @@ -21,6 +21,6 @@ REQUIRE(variable_tensor.type == out_t); for_each (index in shape) { // Read data from pseudo-buffer resource to the output out_t value = tensor_read(variable_tensor.data, variable_tensor.shape, index); - tensor_write(input1, shape, index, value); + tensor_write(output1, shape, index, value); } diff --git a/tosa.xml b/tosa.xml index 9078b97..613fdf9 100644 --- a/tosa.xml +++ b/tosa.xml @@ -287,7 +287,7 @@ DEPTHWISE_CONV2D - + Input tensor @@ -562,7 +562,7 @@ RFFT2D - + Real input. H,W must be powers of two. -- cgit v1.2.1