Skip to content

Conversation

@mshr-h
Copy link
Contributor

@mshr-h mshr-h commented May 26, 2025

Replace mapping.TENSOR_TYPE_TO_NP_TYPE with helper.tensor_dtype_to_np_dtype() to resolve the deprecation warning below.

tvm/python/tvm/relax/frontend/onnx/onnx_frontend.py:69: DeprecationWarning: `mapping.TENSOR_TYPE_TO_NP_TYPE` is now deprecated and will be removed in a future release.To silence this warning, please use `helper.tensor_dtype_to_np_dtype` instead.
    return str(TENSOR_TYPE_TO_NP_TYPE[elem_type])

ref: onnx/onnx#4554

cc @Hzfengsy @yongwww

@mshr-h mshr-h force-pushed the fix-deprecation-TENSOR_TYPE_TO_NP_TYPE branch from 88d10ed to d3dc902 Compare May 27, 2025 02:03
@github-actions github-actions bot requested review from Hzfengsy and yongwww May 27, 2025 05:41
@tqchen tqchen merged commit 44fac51 into apache:main May 27, 2025
14 checks passed
@mshr-h mshr-h deleted the fix-deprecation-TENSOR_TYPE_TO_NP_TYPE branch June 12, 2025 02:30
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
…ge (apache#18016)

replace `mapping.TENSOR_TYPE_TO_NP_TYPE` with `helper.tensor_dtype_to_np_dtype`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants