zihaomu commented on code in PR #585:
URL: https://github.com/apache/tvm-ffi/pull/585#discussion_r3226263557
##########
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:
That’s a good point. I’ll double-check whether this has already been fixed
upstream.
--
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]