ray icon indicating copy to clipboard operation
ray copied to clipboard

[Core] - GPU Support - Explanation of Results

Open brent-anyscale opened this issue 2 years ago • 2 comments

Description

It isn't very clear from the documentation that when you only have 1 GPU, the GPU ID returned will be 0 - this leads to confusion around if GPUs are available/configured.

It would be great to provide a bit more context as what is going to be returned.

Link

https://docs.ray.io/en/latest/ray-core/tasks/using-ray-with-gpus.html#using-gpus-in-tasks-and-actors

brent-anyscale avatar May 04 '23 17:05 brent-anyscale

I believe this is the expected behavior, due to the use of variables like NVIDIA_VISIBLE_DEVICES and also is common in frameworks like pytorch as in torch.cuda.current_device() that also would return 0 (standard case). Probable would be good to have an instruction to use others API, like ray.cluster_resources() to get a total available gpu counts

aavbsouza avatar May 05 '23 06:05 aavbsouza

This P2 issue has seen no activity in the past 2 years. It will be closed in 2 weeks as part of ongoing cleanup efforts.

Please comment and remove the pending-cleanup label if you believe this issue should remain open.

Thanks for contributing to Ray!

cszhu avatar Jun 17 '25 00:06 cszhu