tqchen commented on code in PR #189:
URL: https://github.com/apache/tvm-ffi/pull/189#discussion_r2472933971
##########
python/tvm_ffi/_optional_torch_c_dlpack.py:
##########
@@ -54,6 +54,15 @@ def load_torch_c_dlpack_extension() -> Any:
return None
"""Load the torch c dlpack extension."""
+ try:
+ import torch_c_dlpack_ext # type: ignore # noqa: PLC0415
+
+ func = torch_c_dlpack_ext.load_torch_c_dlpack_lib(torch.__version__)
Review Comment:
do the loading and patching in `torch_c_dlpack_ext`, so we just try `import
torch_c_dlpack_ext` and catch exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]