tqchen commented on code in PR #585:
URL: https://github.com/apache/tvm-ffi/pull/585#discussion_r3225956187
##########
python/tvm_ffi/_optional_torch_c_dlpack.py:
##########
@@ -116,23 +127,18 @@ def load_torch_c_dlpack_extension() -> Any: # noqa:
PLR0912, PLR0915
# `ctypes.CDLL` will raise an `AttributeError`.
# Keep trying JIT
pass
+ except OSError:
+ # A prebuilt torch-c-dlpack-ext wheel can be present but linked
Review Comment:
Mainly want to know if it is something as a temp measure that we can delete
after a few version cycles, if so, please add ad comment
##########
python/tvm_ffi/_optional_torch_c_dlpack.py:
##########
@@ -94,7 +105,7 @@ def load_torch_c_dlpack_extension() -> Any: # noqa:
PLR0912, PLR0915
import torch # noqa: PLC0415
import torch.version # noqa: PLC0415
- prefer_rocm_override = bool(torch.cuda.is_available() and
torch.version.hip is not None)
+ prefer_rocm_override = _torch_extension_device(torch) == "rocm"
Review Comment:
would be great to confirm if upstream hipify already fix the issue
https://github.com/pytorch/pytorch/pull/175432#issuecomment-3936901860 this
special case was forcing local override but in principle upstream pytorch
should have this version
--
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]