Skip to content
Merged
Changes from all commits
Commits
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
7 changes: 2 additions & 5 deletions nemo_rl/models/megatron/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,8 @@ def setup_distributed() -> None:
configure_dynamo_cache()
# Ensure clean slate before import
destroy_parallel_state()
# Pin the communicator to the correct GPU explicitly.
local_rank = int(os.environ["LOCAL_RANK"])
torch.distributed.init_process_group(
"nccl", device_id=torch.device(f"cuda:{local_rank}")
)
# Initialize process group
torch.distributed.init_process_group("nccl")


def validate_and_set_config(
Expand Down
Loading