anijain2305 commented on issue #5345: URL: https://github.com/apache/incubator-tvm/pull/5345#issuecomment-616753221
Maybe we want to move it some other already existing file. But, I think we need this in Relay namespace. This is used in TFLite parser and QNN Op legalization. ~~~ python/tvm/relay/frontend/tflite.py:from .util import get_scalar_from_constant python/tvm/relay/frontend/tflite.py: lhs_scale_value = get_scalar_from_constant(lhs_scale) python/tvm/relay/frontend/tflite.py: rhs_scale_value = get_scalar_from_constant(rhs_scale) python/tvm/relay/frontend/tflite.py: lhs_zero_point_value = get_scalar_from_constant(lhs_zero_point) python/tvm/relay/frontend/tflite.py: rhs_zero_point_value = get_scalar_from_constant(rhs_zero_point) python/tvm/relay/frontend/tflite.py: data_scale_val = get_scalar_from_constant(data_scale) python/tvm/relay/frontend/tflite.py: weight_scale_val = get_scalar_from_constant(weight_scale) python/tvm/relay/frontend/tflite.py: pad_value = get_scalar_from_constant(input_tensor.qnn_params['zero_point']) python/tvm/relay/frontend/tflite.py: data_scale_val = get_scalar_from_constant(data_scale) python/tvm/relay/frontend/tflite.py: weight_scale_val = get_scalar_from_constant(weight_scale) python/tvm/relay/frontend/util.py:def get_scalar_from_constant(expr): python/tvm/relay/qnn/op/legalizations.py:from ...frontend.util import get_scalar_from_constant python/tvm/relay/qnn/op/legalizations.py: zero_point_val = get_scalar_from_constant(zero_point) python/tvm/relay/qnn/op/legalizations.py: zero_point_val = get_scalar_from_constant(zero_point) ~~~ ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
