From 223b60d4ef73dcd227a83af5252a7774bd9c9102 Mon Sep 17 00:00:00 2001 From: Chunseok Lee Date: Fri, 25 Oct 2024 15:32:47 +0900 Subject: [PATCH] remove unused parameter in GRU --- compiler/luci-interpreter/pal/linux/PALGRU.h | 9 +++------ compiler/luci-interpreter/src/kernels/GRU.cpp | 5 +---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/compiler/luci-interpreter/pal/linux/PALGRU.h b/compiler/luci-interpreter/pal/linux/PALGRU.h index cacb6a6d2fb..747d2114b71 100644 --- a/compiler/luci-interpreter/pal/linux/PALGRU.h +++ b/compiler/luci-interpreter/pal/linux/PALGRU.h @@ -62,8 +62,7 @@ void calculateGRU(const float *input_data, const float *weight_input_data, const tflite::RuntimeShape &input_shape, const tflite::RuntimeShape &output_shape, const tflite::RuntimeShape &weight_input_shape, const tflite::RuntimeShape &weight_hidden_shape, float *output_input_data, - float *output_hidden_data, const tflite::RuntimeShape &output_shape_fc, - float *intermediate_buffer) + float *output_hidden_data, const tflite::RuntimeShape &output_shape_fc) { tflite::FullyConnectedParams op_params{}; // As FC nodes doesn't have any activations inside GRU, let' use just numeric limits @@ -150,8 +149,7 @@ void GRU(const float *input_data, const float *weight_input_data, const float *w const float *hidden_state_data, float *output_data, float *output_input_data, float *output_hidden_data, const tflite::RuntimeShape &input_shape, const tflite::RuntimeShape &output_shape, const tflite::RuntimeShape &weight_input_shape, - const tflite::RuntimeShape &weight_hidden_shape, const size_t intermediate_buffer_size, - float *intermediate_buffer) + const tflite::RuntimeShape &weight_hidden_shape) { const int32_t time = input_shape.Dims(0); @@ -165,8 +163,7 @@ void GRU(const float *input_data, const float *weight_input_data, const float *w { calculateGRU(input_data, weight_input_data, weight_hidden_data, bias_input_data, bias_hidden_data, output_data, input_shape, output_shape, weight_input_shape, - weight_hidden_shape, output_input_data, output_hidden_data, output_shape_fc, - intermediate_buffer); + weight_hidden_shape, output_input_data, output_hidden_data, output_shape_fc); input_data += input_shape.Dims(2); } } diff --git a/compiler/luci-interpreter/src/kernels/GRU.cpp b/compiler/luci-interpreter/src/kernels/GRU.cpp index 505b9c97471..9adb7785d87 100644 --- a/compiler/luci-interpreter/src/kernels/GRU.cpp +++ b/compiler/luci-interpreter/src/kernels/GRU.cpp @@ -40,8 +40,6 @@ void GRU::configure() auto hidden_input_shape = getTensorShape(hidden_input()); LUCI_INTERPRETER_CHECK(hidden_hidden_shape.Dims(0) == hidden_input_shape.Dims(0)); - const int32_t div_factor = 3; - auto output_shape = getTensorShape(output()); auto state_shape = getTensorShape(state()); @@ -77,8 +75,7 @@ void GRU::evalFloat() const getTensorData(hidden_hidden_bias()), getTensorData(state()), getTensorData(output()), reinterpret_cast(output_input_data), reinterpret_cast(output_hidden_data), getTensorShape(input()), - getTensorShape(output()), getTensorShape(hidden_input()), getTensorShape(hidden_hidden()), 0, - nullptr); + getTensorShape(output()), getTensorShape(hidden_input()), getTensorShape(hidden_hidden())); delete output_hidden_data; delete output_input_data;