@@ -26,11 +26,11 @@ void quantized_relu_per_tensor_out(
2626 const int64_t out_multiplier,
2727 const int64_t out_shift,
2828 Tensor& output) {
29- const uint8_t _in_zero_point = static_cast <uint8_t >(in_zero_point);
30- const uint8_t _out_zero_point = static_cast <uint8_t >(out_zero_point);
31- const int32_t _out_multiplier = static_cast <int32_t >(out_multiplier);
32- const int32_t _out_shift = static_cast <int32_t >(out_shift);
3329 if (input.scalar_type () == executorch::aten::ScalarType::Byte) {
30+ const uint8_t _in_zero_point = static_cast <uint8_t >(in_zero_point);
31+ const uint8_t _out_zero_point = static_cast <uint8_t >(out_zero_point);
32+ const int32_t _out_multiplier = static_cast <int32_t >(out_multiplier);
33+ const int32_t _out_shift = static_cast <int32_t >(out_shift);
3434 const uint8_t * p_in = input.const_data_ptr <uint8_t >();
3535 uint8_t * p_out = output.mutable_data_ptr <uint8_t >();
3636
@@ -48,6 +48,10 @@ void quantized_relu_per_tensor_out(
4848 ET_CHECK_MSG (ret_val == 0 , " An internal error occured" );
4949
5050 } else if (input.scalar_type () == executorch::aten::ScalarType::Char) {
51+ const int8_t _in_zero_point = static_cast <int8_t >(in_zero_point);
52+ const int8_t _out_zero_point = static_cast <int8_t >(out_zero_point);
53+ const int32_t _out_multiplier = static_cast <int32_t >(out_multiplier);
54+ const int32_t _out_shift = static_cast <int32_t >(out_shift);
5155 const int8_t * p_in = input.const_data_ptr <int8_t >();
5256 int8_t * p_out = output.mutable_data_ptr <int8_t >();
5357
0 commit comments