Skip to content

Conversation

thaisacs
Copy link
Contributor

Before this PR I was getting the following error:

Traceback (most recent call last): File "/home/thais/Dev/TVM-LLM-Bench/test-export.py", line 36, in <module> mod: tvm.IRModule = from_exported_program(exported_program) File "/home/thais/Dev/new-tvm/tvm/python/tvm/relax/frontend/torch/exported_program_translator.py", line 806, in from_exported_program return ExportedProgramImporter().from_exported_program( File "/home/thais/Dev/new-tvm/tvm/python/tvm/relax/frontend/torch/exported_program_translator.py", line 718, in from_exported_program binding[bind_name] = tvm.nd.from_dlpack(tensor_value.detach()) File "/home/thais/Dev/new-tvm/tvm/python/tvm/runtime/ndarray.py", line 66, in from_dlpack return tvm.ffi.from_dlpack( File "tvm/ffi/cython/./ndarray.pxi", line 112, in tvm.ffi.core.from_dlpack File "tvm/ffi/cython/./ndarray.pxi", line 60, in tvm.ffi.core._from_dlpack File "tvm/ffi/cython/./error.pxi", line 171, in tvm.ffi.core.CHECK_CALL File "tvm/ffi/cython/core.cpp", line 19568, in __pyx_pw_3tvm_3ffi_4core_35from_dlpack File "tvm/ffi/cython/core.cpp", line 19691, in __pyx_pf_3tvm_3ffi_4core_34from_dlpack File "tvm/ffi/cython/core.cpp", line 19179, in __pyx_f_3tvm_3ffi_4core__from_dlpack RuntimeError: FromDLPack: Data is not aligned to 64 bytes.

@tlopex
Copy link
Contributor

tlopex commented Sep 19, 2025

@thaisacs
Thanks for the fixing. We have renamed the

  • tvm.nd.empty => tvm.runtime.empty
  • tvm.nd.NDArray=>tvm.runtime.Tensor
  • tvm.nd.from_dlpack=>tvm.runtime.from_dlpack

You can update the name and commit again :)

@tlopex tlopex self-assigned this Sep 19, 2025
@thaisacs
Copy link
Contributor Author

@tlopex
Thanks for replying.

Does it look good?

Copy link
Contributor

@tlopex tlopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@tlopex tlopex merged commit af82187 into apache:main Sep 19, 2025
10 checks passed
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