-
Notifications
You must be signed in to change notification settings - Fork 31
/
makefile
34 lines (29 loc) · 1.93 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
lint:
-ruff check --fix
format:
@usort format .
@ruff format
type-check:
@mypy .
test:
# We add the `-I` flag to only use the installed package and not use local modules.
# Note that we cannot add it to all tests because of the implemented import logic.
# See PR #49 for more details.
# TODO: Find better solution.
@python3 -I -m unittest discover -s tests/ -p "*_test.py"
@python3 -I -m unittest discover -s distributed_shampoo/tests/ -p "*_test.py"
@python3 -m unittest discover -s distributed_shampoo/utils/tests/ -p "*_test.py"
@python3 -m unittest discover -s distributed_shampoo/gpu_tests/ -p "*_test.py"
@python3 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_dist_utils_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_ddp_distributor_test.py
test-gpu:
@python3 -m unittest discover -s distributed_shampoo/gpu_tests/ -p "*_test.py"
@python3 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_dist_utils_test.py
test-multi-gpu:
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest discover -s distributed_shampoo/gpu_tests/ -p "*_test.py"
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_dist_utils_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_ddp_distributor_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_fsdp_distributor_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=2 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_fully_shard_distributor_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=4 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_hsdp_distributor_test.py
@torchrun --standalone --nnodes=1 --nproc_per_node=4 -m unittest distributed_shampoo/utils/gpu_tests/shampoo_fsdp_utils_test.py