I found that I can simply use DLPACK to convert tvm tensor to pytorch tensor 
and vice versa. The problem has been solved!

    from torch.utils.dlpack import to_dlpack, from_dlpack
    from tvm.runtime import ndarray
    ...
    m.set_input('input1', ndarray.from_dlpack(to_dlpack(input1)))
    ...
    pytorch_output = from_dlpack(tvm_output.to_dlpack())





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/sovled-dlpack-error-attributeerror-module-has-no-function-tvm-main/8029/5)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/f30bf38d1cfc1c52b2e394a8202e5e3a9e4e455cfc1413d6e98345f45d23b89c).

Reply via email to