From a63ee4d7be5ea5a3e8ad218c0e40c46af22e939f Mon Sep 17 00:00:00 2001 From: tlopex <820958424@qq.com> Date: Thu, 26 Mar 2026 19:28:00 -0400 Subject: [PATCH] finish1 --- python/tvm/relax/frontend/tflite/tflite_frontend.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tvm/relax/frontend/tflite/tflite_frontend.py b/python/tvm/relax/frontend/tflite/tflite_frontend.py index 0abd700562e2..5c73af18ad17 100644 --- a/python/tvm/relax/frontend/tflite/tflite_frontend.py +++ b/python/tvm/relax/frontend/tflite/tflite_frontend.py @@ -597,8 +597,8 @@ def quantize(x): # Get min/max of the output dtype. This will be used to ensure that clip a_min/a_max are not # beyond the dtype range. - qmin = float(tvm.tir.op.min_value(dtype).value) - qmax = float(tvm.tir.op.max_value(dtype).value) + qmin = float(tvm.tirx.min_value(dtype).value) + qmax = float(tvm.tirx.max_value(dtype).value) # The input expr is a quantized tensor with its scale and zero point. We calculate the # suitable clip off points based on these scale and zero point. @@ -1117,8 +1117,8 @@ def quantize(x): # Get min/max of the input dtype. This will be used to ensure that # clip a_min/a_max are not beyond the dtype range. input_tensor_type_str = self.get_tensor_type_str(input_tensor.tensor.Type()) - qmin = float(tvm.tir.op.min_value(input_tensor_type_str).value) - qmax = float(tvm.tir.op.max_value(input_tensor_type_str).value) + qmin = float(tvm.tirx.min_value(input_tensor_type_str).value) + qmax = float(tvm.tirx.max_value(input_tensor_type_str).value) out = relax.op.clip( in_expr, min=max(qmin, quantize(-1.0)), max=min(qmax, quantize(1.0))