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

add visible config env for ascend npu #5369

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 4 additions & 0 deletions deepspeed/launcher/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ def main():
logger.info(f"dist_world_size={dist_world_size}")
current_env["CUDA_VISIBLE_DEVICES"] = ",".join(map(str, local_gpu_ids))
logger.info(f"Setting CUDA_VISIBLE_DEVICES={current_env['CUDA_VISIBLE_DEVICES']}")
current_env["NPU_VISIBLE_DEVICES"] = ",".join(map(str, local_gpu_ids))
logger.info(f"Setting NPU_VISIBLE_DEVICES={current_env['NPU_VISIBLE_DEVICES']}")
current_env["ASCEND_RT_VISIBLE_DEVICES"] = ",".join(map(str, local_gpu_ids))
logger.info(f"Setting ASCEND_RT_VISIBLE_DEVICES={current_env['ASCEND_RT_VISIBLE_DEVICES']}")

# set PyTorch distributed related environmental variables
current_env["MASTER_ADDR"] = args.master_addr
Expand Down
Loading