Unverified Commit 171775f3 authored by Liwen's avatar Liwen Committed by GitHub
Browse files

Fix Device Index for ROCm Ray Workers in MoE Benchmark (#38108)


Signed-off-by: default avatarLiwen <53441624+li-liwen@users.noreply.github.com>
Co-authored-by: default avatarKunshang Ji <kunshang.ji@intel.com>
parent 58a249bc
...@@ -627,9 +627,8 @@ class BenchmarkWorker: ...@@ -627,9 +627,8 @@ class BenchmarkWorker:
need_device_guard = True need_device_guard = True
with ( with (
torch.accelerator.device_index(self.device_id) # Ray restricts each worker to one GPU; use local index 0
if need_device_guard torch.accelerator.device_index(0) if need_device_guard else nullcontext()
else nullcontext()
): ):
for idx, config in enumerate(tqdm(search_space)): for idx, config in enumerate(tqdm(search_space)):
try: try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment