forked from NVIDIA/apex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bfloat16 support for mgpu (NVIDIA#19)
* bfloat16 support for apex DDP * enable mgpu tests for fp16 and bf16 * update Dockerfile
- Loading branch information
Showing
5 changed files
with
44 additions
and
9 deletions.
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
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
30 changes: 30 additions & 0 deletions
30
tests/distributed/amp_master_params/run_rocm_distributed.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# To run the test on 2 gpus | ||
export WORLD_SIZE=2 | ||
|
||
# Test with opt_level="O2" | ||
echo "running opt_level O2" | ||
python3.6 -m torch.distributed.launch --nproc_per_node=2 amp_master_params.py --opt_level "O2" | ||
python3.6 compare.py | ||
|
||
# delete the model files | ||
echo -e "O2 test completed. Deleting model files\n" | ||
rm rank0model.pth | ||
rm rank1model.pth | ||
rm rank0master.pth | ||
rm rank1master.pth | ||
|
||
|
||
# Test with opt_level="O5" | ||
echo "running opt_level O5" | ||
python3.6 -m torch.distributed.launch --nproc_per_node=2 amp_master_params.py --opt_level "O5" | ||
python3.6 compare.py | ||
|
||
# delete the model files | ||
echo "O5 test completed. Deleting model files" | ||
rm rank0model.pth | ||
rm rank1model.pth | ||
rm rank0master.pth | ||
rm rank1master.pth |