1 Commits

Author SHA1 Message Date
Eric Lunderberg 7dc0472aef [Bugfix] CudaDeviceAPI::GetAttr may check kExist when GPUs absent (#16903)
This commit resolves a bug that was introduced in
https://github.com/apache/tvm/pull/16377.  If no CUDA-capable GPUs are
present, the call to `cudaGetDeviceCount` will return an error, which will
be raised as an exception by the `CUDA_CALL` macro.  However, checking
the `kExist` flag is valid even if no GPUs are present.

This commit removes the use of `CUDA_CALL`, and instead returns false
in this case.
2024-04-18 11:50:01 -04:00