tqchen opened a new pull request, #652:
URL: https://github.com/apache/tvm-ffi/pull/652

   Fixes #651.
   
   The JIT extension backend selector decided CUDA-vs-HIP by probing for a ROCm
   home, whose fallback returns `/opt/rocm` whenever that directory merely 
exists.
   A CUDA/NVIDIA host carrying a stray `/opt/rocm` was therefore misclassified 
as
   HIP even with `nvcc` present and no `hipcc`.
   
   `_detect_gpu_backend()` now resolves the backend from explicit signals, in
   order: the `TVM_FFI_GPU_BACKEND` override, then PyTorch build signals
   (`torch.version.hip` / `torch.version.cuda`), then an available `hipcc` when 
no
   `nvcc` is present. Detection defaults to CUDA when otherwise inconclusive, 
and
   the existence of `/opt/rocm` alone never forces HIP. Toolkit-home, compiler,
   include-path, flag, and architecture discovery are unchanged and run only 
after
   the backend is resolved, so CUDA and HIP state never mix.


-- 
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]

Reply via email to