diff options
author | Eric Kunze <eric.kunze@arm.com> | 2023-09-07 00:31:54 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-09-08 17:57:03 +0000 |
commit | a8098c06885e6fb5ce3239830e1cd344c98262a4 (patch) | |
tree | 4fad65395c54dad35058369f1ab2e78e1ef7ff66 /reference_model/src/operators.cc | |
parent | 1271c44bd2c9e670e132db491a053a0e6603798f (diff) | |
download | reference_model-a8098c06885e6fb5ce3239830e1cd344c98262a4.tar.gz |
Support new RESCALE attributes
input_unsigned and output_unsigned were added to the specification.
Older TOSA files with uint data types are still supported.
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I125886ffc92975d99971e56e2075dd5d96bdbdc4
Diffstat (limited to 'reference_model/src/operators.cc')
-rw-r--r-- | reference_model/src/operators.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/reference_model/src/operators.cc b/reference_model/src/operators.cc index 68314c9..96f1c1a 100644 --- a/reference_model/src/operators.cc +++ b/reference_model/src/operators.cc @@ -2514,6 +2514,8 @@ extern "C" const int32_t client_shift[], const bool client_scale32, const bool client_double_round, + const bool client_input_unsigned, + const bool client_output_unsigned, const bool client_per_channel, const func_config_t& func_config, const func_debug_t& func_debug) @@ -2523,10 +2525,13 @@ extern "C" const int32_t output_zp = client_output_zp; const std::vector<int32_t> multiplier(&client_multiplier[0], &client_multiplier[0] + client_multiplier_len); const std::vector<int32_t> shift(&client_shift[0], &client_shift[0] + client_shift_len); - const bool scale32 = client_scale32; - const bool double_round = client_double_round; - const bool per_channel = client_per_channel; - TosaRescaleAttribute attr(input_zp, output_zp, multiplier, shift, scale32, double_round, per_channel); + const bool scale32 = client_scale32; + const bool double_round = client_double_round; + const bool per_channel = client_per_channel; + const bool input_unsigned = client_input_unsigned; + const bool output_unsigned = client_output_unsigned; + TosaRescaleAttribute attr(input_zp, output_zp, multiplier, shift, scale32, double_round, per_channel, + input_unsigned, output_unsigned); // Create tensors tosa::TosaSerializationTensor* input = translate_client_tensor(client_input, "input"); |