-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 device config env for the accelerator #5396
Conversation
@microsoft-github-policy-service agree |
great thanks to HW and Microsoft,as ascend npu customer, we'll continuously provide contributions. |
Thanks to you too :) |
@delock @nelyahu @mrwyattii we added an accelerator method to get the env of the visible device, and we don't know the env of other accelerators. Can you provide it? |
For XPU, the name of env is I think it would be better to define interface as |
For HPU HABANA_VISIBLE_MODULES I think @delock proposed a good approach |
@shiyuan680, thanks for creating this PR. Can you please add this interface suggested by @delock? |
Co-authored-by: eigen2017 <[email protected]>
@loadams CI has passed, would you please help to review this PR and add to merge queue ? |
@CurryRice233, can you help to address my questions? Thanks! |
yes it is unknown that how to set cpu and mps env,both setting CUDA_VISIBLE_DEVICES, i suppose it is means to keep the same logic to the old version of deepspeed for mps and cpu. so is it better to add annotations over the code to explain why set CUDA_VISIBLE_DEVICES ? |
@eigen2017, yes annotation is reasonable for this. Thanks for your explanation. |
i don't have write access to microsoft/DeepSpeed, could anyone help to add new commits to branch [shiyuan680:master], and add annotations to [mps_accelerator.py] and [cpu_accelerator.py] ? @tjruwase @CurryRice233 @loadams @shiyuan680 explainations can like: |
@tjruwase thank you for helping us~~thank you~ |
@eigen2017 thank you for your explanation, and @tjruwase thank you for the annotation. :) |
Thank you for [pr](microsoft#5369) and @delock contribution of ideas. As mentioned in this [pr](microsoft#5369), each device has its own environmental variables. We create visible_devices_envs() and set_visible_devices_envs() methods on the accelerator class to enable each accelerator to implement env settings within the interface , which is more generic to other accelerators. this commit has tested on npu, each one has 8 ascend npus --------- Co-authored-by: yangcheng <[email protected]> Co-authored-by: eigen2017 <[email protected]> Co-authored-by: Logan Adams <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]>
Thank you for [pr](microsoft#5369) and @delock contribution of ideas. As mentioned in this [pr](microsoft#5369), each device has its own environmental variables. We create visible_devices_envs() and set_visible_devices_envs() methods on the accelerator class to enable each accelerator to implement env settings within the interface , which is more generic to other accelerators. this commit has tested on npu, each one has 8 ascend npus --------- Co-authored-by: yangcheng <[email protected]> Co-authored-by: eigen2017 <[email protected]> Co-authored-by: Logan Adams <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]>
Thank you for [pr](microsoft#5369) and @delock contribution of ideas. As mentioned in this [pr](microsoft#5369), each device has its own environmental variables. We create visible_devices_envs() and set_visible_devices_envs() methods on the accelerator class to enable each accelerator to implement env settings within the interface , which is more generic to other accelerators. this commit has tested on npu, each one has 8 ascend npus --------- Co-authored-by: yangcheng <[email protected]> Co-authored-by: eigen2017 <[email protected]> Co-authored-by: Logan Adams <[email protected]> Co-authored-by: Olatunji Ruwase <[email protected]>
Thank you for pr and @delock contribution of ideas.
As mentioned in this pr, each device has its own environmental variables.
We create visible_devices_envs() and set_visible_devices_envs() methods on the accelerator class to enable each accelerator to implement env settings within the interface , which is more generic to other accelerators.
this commit has tested on npu, each one has 8 ascend npus