-
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 visible config env for ascend npu #5369
Conversation
…VISIBLE_DEVICES and ASCEND_RT_VISIBLE_DEVICES
ascend npu is hardware of HW accelerators |
and this issue will be solved on ascend npu ^_^ |
I think a better way is get_accelerator().set_visible_devices(). |
CUDA_VISIBLE_DEVICES and NPU_VISIBLE_DEVICES&ASCEND_RT_VISIBLE_DEVICES are same level concepts. and this commit is more in line with the architecture design of launch.py |
more clearly about what issue i have solved: |
I will assign @shiyuan680 to solve this problem within this week. We will create a |
that's good, but i first found this issue, and it's my idea to gave a simple solution here, i hope deepspeed merg it first to master branch quikly. by the way , i'm customer of HW ascend npus and running poc of it , it's not work if only set ASCEND_RT_VISIBLE_DEVICES on my device. |
We have noticed this problem a long time ago, we have already planned solution. Deepspeed has 6 accelerators, not a good idea hardcode 6 envs here, I think @tjruwase has the same opinion. On the other hand, we do not care who push the code, if you want we can add your name as author (like this), or directly push the code to your repository, and solve with your PR. about NPU_VISIBLE_DEVICES, is a deprecated env, does not recommend using this variable, I tested on our server, works perfect with only ASCEND_RT_VISIBLE_DEVICES, you can try upgrading Ascend HDK and CANN. |
co-author is fine, thanks , my account primary email: [email protected] i didn't find any pr or issue discussed this obvious issue like this, i pushed this issue directly to HW supporters and got no solution, if the issue you found long time ago, why no pr and no one of my HW supporters knows how to solve this ? so i still insist on that , i found this issue and figured out the solution first. so add me to co-author can stop this debate. and 6 accs has 6 envs , it's right to put them into one function, including cuda accs. i suggest keep NPU_VISIBLE_DEVICES, for compatable for old versions of npus. my npu-smi info is: |
Hi @eigen2017 - should we close this PR in favor of #5396? |
surely, thank you for asking me . |
Thank you for [pr](#5369) and @delock contribution of ideas. As mentioned in this [pr](#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](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]>
when select gpu id on ascend npu, CUDA_VISIBLE_DEVICES is not work.
ascend npu visible config env is NPU_VISIBLE_DEVICES and ASCEND_RT_VISIBLE_DEVICES.
this pull request will make deepspeed configs work on ascend npu:
and CUDA_VISIBLE_DEVICES is for cuda gpus, NPU_VISIBLE_DEVICES&ASCEND_RT_VISIBLE_DEVICES are for ascend npus, which means this commit will not affect deepspeed supporting cuda gpus.
this commit has tested on Atlas-800t-A2, each one has 8 ascend npus(910b)
910b is the state-of-art of ascend npu series.