diff --git a/python/tvm/relay/frontend/onnx.py b/python/tvm/relay/frontend/onnx.py index 2b0a86478aa2..126064f560c2 100644 --- a/python/tvm/relay/frontend/onnx.py +++ b/python/tvm/relay/frontend/onnx.py @@ -3321,7 +3321,7 @@ def get_scalar(x, dtype="float32"): y_scale = fold_constant(get_scalar(inputs[6])) y_zero_point = get_scalar(inputs[7], "int32") - dtype = infer_type(a).checked_type.dtype + dtype = infer_type(a).dtype ## Onnxruntime doesn't actually do this op in integer, they dequantize to fp32 ## and then requantize afer @@ -3986,7 +3986,7 @@ class Celu(OnnxOpConverter): @classmethod def _impl_v12(cls, inputs, attr, params): x = inputs[0] - dtype = infer_type(x).checked_type.dtype + dtype = infer_type(x).dtype alpha = _op.const(attr.get("alpha", 1.0), dtype) zero = _op.const(0, dtype) one = _op.const(1, dtype) diff --git a/python/tvm/relay/frontend/pytorch.py b/python/tvm/relay/frontend/pytorch.py index fe7ad5cf5778..0be229e26a6b 100644 --- a/python/tvm/relay/frontend/pytorch.py +++ b/python/tvm/relay/frontend/pytorch.py @@ -26,12 +26,10 @@ import numpy as np import tvm -from tvm.ir import IRModule from tvm.topi.utils import get_const_tuple from .. import analysis as _analysis from .. import expr as _expr -from .. import function as _function from .. import op as _op from .. import qnn, transform from ..expr_functor import ExprMutator