From c2127a25c787492fea657b867a6c668a317166fb Mon Sep 17 00:00:00 2001 From: Micah Williamson Date: Sun, 28 Jun 2026 12:50:30 -0500 Subject: [PATCH] [ROCm][CI] Fix `rlhf_async_new_apis` Example On ROCm (#46895) Signed-off-by: Micah Williamson Signed-off-by: Matthew Wong Co-authored-by: Matthew Wong Co-authored-by: Andreas Karatzas --- examples/rl/rlhf_async_new_apis.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/rl/rlhf_async_new_apis.py b/examples/rl/rlhf_async_new_apis.py index a6adc20886..9c3f4700d9 100644 --- a/examples/rl/rlhf_async_new_apis.py +++ b/examples/rl/rlhf_async_new_apis.py @@ -190,12 +190,11 @@ class TrainModel: # Build platform-specific env vars for Ray -ray_env_vars = { - # Prevent Ray from setting CUDA_VISIBLE_DEVICES - "RAY_EXPERIMENTAL_NOSET_CUDA_ENV_VAR": "1", -} +ray_env_vars = {} if current_platform.is_rocm(): + # Workaround for RCCL bug. See https://github.com/ROCm/rocm-systems/issues/5756 + ray_env_vars["RAY_EXPERIMENTAL_NOSET_HIP_VISIBLE_DEVICES"] = "1" # For ROCm, BATCH_INVARIANT vllm is not supported ray_env_vars["VLLM_ROCM_USE_SKINNY_GEMM"] = "0" else: