Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[air/benchmark] Torch benchmarks for 4x4 #26692

Merged
merged 29 commits into from
Jul 19, 2022
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use local rank for cuda device
  • Loading branch information
JiahaoYao authored Jul 13, 2022
commit 72108b792f88336664dd3cfdef4a618ec8c64413
4 changes: 3 additions & 1 deletion python/ray/train/torch/train_loop_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ def get_device(self) -> torch.device:
if torch.cuda.is_available():
gpu_ids = ray.get_gpu_ids()
if len(gpu_ids) > 0:
device_id = gpu_ids[0]
gpu_id = gpu_ids[0]
cuda_visible_list = list(map(int, ray._private.utils.get_cuda_visible_devices()))
device_id = cuda_visible_list.index(gpu_id)
else:
# If called on the driver or outside of Ray Train, return the
# 0th device.
Expand Down