-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add MLU devices for rng state saving and loading. (#2940)
* Add Cambricon MLU accelerator support * up mlu support for test * fix mlu device MULTI_MLU * Update src/accelerate/utils/imports.py it's beautiful ! Co-authored-by: Zach Mueller <[email protected]> * up mlu for quality check * fix mlu device longTensor error * fix mlu device tensor dtype check * fix mlu device send_to_device with torch dynamo error * Refactor AcceleratorState * Should be near complete now * Last missing piece * Make my way to the acceleratorstate * Include update to global var * Don't use global * gpu -> cuda * Don't use update for dict, easier to read * Fix tests * stash * Getting closer... * Needed to spawn at the very end after env was setup * Explain set_device before deepspeed * Make docstring more accurate * Early return insteaD * Delineat blocks * Make prepare_backend return state + backend for clarity/less magic * fix mlu longtensor.to() bugs. * fix MLU devices rng state save and load. --------- Co-authored-by: Zach Mueller <[email protected]>
- Loading branch information
1 parent
308a8e9
commit 386f7d2
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters