Skip to content

Commit 6c54963

Browse files
Revert "[dtensor] move all tests to distribute/tensor folder (#144166)"
This reverts commit 2e1ea85. Reverted #144166 on behalf of https://github.com/huydhn due to Sorry for reverting your change, but inductor/test_compiled_autograd needs to be updated ([comment](#144166 (comment)))
1 parent e4a05de commit 6c54963

35 files changed

+19
-18
lines changed

.ci/pytorch/multigpu-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ if [[ "${SHARD_NUMBER:-2}" == "2" ]]; then
4343
time python test/run_test.py --verbose -i distributed/test_functional_api
4444

4545
# DTensor tests
46-
time python test/run_test.py --verbose -i distributed/tensor/test_random_ops
47-
time python test/run_test.py --verbose -i distributed/tensor/test_dtensor_compile
46+
time python test/run_test.py --verbose -i distributed/_tensor/test_random_ops
47+
time python test/run_test.py --verbose -i distributed/_tensor/test_dtensor_compile
4848

4949
# DeviceMesh test
5050
time python test/run_test.py --verbose -i distributed/test_device_mesh

.ci/pytorch/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ test_inductor_distributed() {
329329
python test/run_test.py -i inductor/test_aot_inductor.py -k test_non_default_cuda_device --verbose
330330
python test/run_test.py -i inductor/test_aot_inductor.py -k test_replicate_on_devices --verbose
331331
python test/run_test.py -i distributed/test_c10d_functional_native.py --verbose
332-
python test/run_test.py -i distributed/tensor/test_dtensor_compile.py --verbose
332+
python test/run_test.py -i distributed/_tensor/test_dtensor_compile.py --verbose
333333
python test/run_test.py -i distributed/tensor/parallel/test_micro_pipeline_tp.py --verbose
334334
python test/run_test.py -i distributed/_composable/test_replicate_with_compiler.py --verbose
335335
python test/run_test.py -i distributed/_composable/fsdp/test_fully_shard_comm.py --verbose

.github/labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
- torch/fx/experimental/sym_node.py
3131
- torch/fx/experimental/validator.py
3232
- torch/fx/experimental/proxy_tensor.py
33-
- test/distributed/tensor/test_dtensor_compile.py
33+
- test/distributed/_tensor/test_dtensor_compile.py
3434
- test/distributed/tensor/parallel/test_fsdp_2d_parallel.py
35-
- torch/distributed/tensor/**
35+
- torch/distributed/_tensor/**
3636
- torch/distributed/fsdp/**
3737
- torch/csrc/inductor/**
3838
- torch/csrc/dynamo/**

test/distributed/_tensor/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Run distributed tensor tests:
2+
3+
from root, run (either CPU or GPU)
4+
5+
`pytest test/spmd/tensor/test_tensor.py`
6+
7+
`pytest test/spmd/tensor/test_ddp.py`
8+
9+
run specific test case and print stdout/stderr:
10+
11+
`pytest test/spmd/tensor/test_tensor.py -s -k test_tensor_from_local`

test/distributed/tensor/test_dtensor_ops.py renamed to test/distributed/_tensor/test_dtensor_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def wrapped(fn):
8282

8383
# Re-generate this failed list, turn on dry_run of the below func
8484
# check_dtensor_func(self, test, op, dry_run=True), then run sth
85-
# like python test/distributed/tensor/test_dtensor_ops.py > failed.expect
85+
# like python test/distributed/_tensor/test_dtensor_ops.py > failed.expect
8686
dtensor_fails = {
8787
# these sometimes pass and sometimes fail
8888
# we need to remove many of them from list once op

test/distributed/tensor/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

test/run_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def __contains__(self, item):
182182
"test_jit_legacy",
183183
"test_cuda_nvml_based_avail",
184184
"test_jit_cuda_fuser",
185-
"distributed/tensor/test_attention",
185+
"distributed/_tensor/test_attention",
186186
]
187187

188188
# whitelist of tests for s390x

torch/fx/experimental/symbolic_shapes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ def free_symbols(val: IterateExprs) -> OrderedSet[sympy.Symbol]:
837837
return OrderedSet()
838838

839839
# TODO: Apparently, returning an OrderedSet here breaks
840-
# python test/distributed/tensor/test_dtensor_compile.py TestDTensorCompile.test_dtensor_dynamic
840+
# python test/distributed/_tensor/test_dtensor_compile.py TestDTensorCompile.test_dtensor_dynamic
841841
return first_expr.free_symbols.union(*(e.free_symbols for e in itr)) # type: ignore[return-value]
842842

843843

0 commit comments

Comments
 (0)