Skip to content

Commit 88d10ed

Browse files
committed
replace mapping.TENSOR_TYPE_TO_NP_TYPE with helper.tensor_dtype_to_np_dtype
1 parent fbd9fe4 commit 88d10ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/tvm/relax/frontend/onnx/onnx_frontend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ def get_type(elem_type: Union[str, int]) -> str:
6060
return elem_type
6161

6262
try:
63-
from onnx.mapping import ( # pylint: disable=import-outside-toplevel
64-
TENSOR_TYPE_TO_NP_TYPE,
63+
from onnx.helper import ( # pylint: disable=import-outside-toplevel
64+
tensor_dtype_to_np_dtype,
6565
)
6666
except ImportError as exception:
6767
raise ImportError("Unable to import onnx which is required {}".format(exception))
6868

69-
return str(TENSOR_TYPE_TO_NP_TYPE[elem_type])
69+
return str(tensor_dtype_to_np_dtype[elem_type])
7070

7171

7272
def get_constant(

0 commit comments

Comments
 (0)