Skip to content

Commit 81065ad

Browse files
committed
fix: Reorganize testing directories
1 parent c5975fb commit 81065ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+113
-63
lines changed

.circleci/config.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -754,14 +754,30 @@ commands:
754754

755755
# =================== Dynamo tests start ======================== #
756756

757-
test-dynamo-torch_compile:
758-
description: "Test Dynamo torch_compile tests"
757+
test-dynamo-backend:
758+
description: "Test Dynamo backend tests"
759759
steps:
760760
- run:
761-
name: Run Dynamo torch_compile tests
761+
name: Run Dynamo backend tests
762762
command: |
763763
cd tests/py/dynamo/backend/
764-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/torch_compile/test_results.xml
764+
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
765+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/backend/test_results.xml $TESTS_TO_RUN
766+
767+
- store_test_results:
768+
path: /tmp/artifacts
769+
- store_artifacts:
770+
path: /tmp/testlogs
771+
772+
test-dynamo-shared_utilities:
773+
description: "Test Dynamo shared utilities tests"
774+
steps:
775+
- run:
776+
name: Run Dynamo lowering, partitioning, runtime tests
777+
command: |
778+
cd tests/py/dynamo/
779+
TESTS_TO_RUN=$(circleci tests glob "runtime/test_*.py" "partitioning/test_*.py" "lowering/test_*.py" | circleci tests split --split-by=timings)
780+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/shared_utilities/test_results.xml $TESTS_TO_RUN
765781
766782
- store_test_results:
767783
path: /tmp/artifacts
@@ -806,9 +822,9 @@ commands:
806822
- run:
807823
name: Run Dynamo converter tests
808824
command: |
809-
cd tests/py/dynamo/converters
825+
cd tests/py/dynamo/conversion
810826
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
811-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/converters/test_results.xml $TESTS_TO_RUN
827+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/conversion/test_results.xml $TESTS_TO_RUN
812828
813829
- store_test_results:
814830
path: /tmp/artifacts
@@ -1079,7 +1095,8 @@ jobs:
10791095
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
10801096
- dump-test-env
10811097
- test-dynamo-converters
1082-
- test-dynamo-torch_compile
1098+
- test-dynamo-backend
1099+
- test-dynamo-shared_utilities
10831100
- test-dynamo-models_torch_compile
10841101
- test-dynamo-models_torch_export
10851102

tests/py/dynamo/__init__.py

Whitespace-only changes.

tests/py/dynamo/backend/__init__.py

Whitespace-only changes.

tests/py/dynamo/backend/test_backend_compiler.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
from copy import deepcopy
2+
13
import torch
24
import torch_tensorrt
5+
from torch.testing._internal.common_utils import TestCase, run_tests
36
from torch_tensorrt.dynamo.partitioning import fast_partition
4-
from torch.testing._internal.common_utils import run_tests, TestCase
5-
from copy import deepcopy
6-
from utils import lower_graph_testing, DECIMALS_OF_AGREEMENT
7+
8+
from ..testing_utilities import DECIMALS_OF_AGREEMENT, lower_graph_testing
79

810

911
class TestTRTModuleNextCompilation(TestCase):

tests/py/dynamo/backend/test_pre_aot_lowering.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import torch
22
import torch_tensorrt
3-
from utils import lower_graph_testing
4-
from torch.testing._internal.common_utils import run_tests, TestCase
3+
from torch.testing._internal.common_utils import TestCase, run_tests
4+
5+
from ..testing_utilities import lower_graph_testing
56

67

78
class TestMaxPool1D(TestCase):

tests/py/dynamo/backend/test_specialized_models.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from utils import lower_graph_testing
2-
from torch.testing._internal.common_utils import run_tests, TestCase
31
import torch
42
import torch_tensorrt
3+
from torch.testing._internal.common_utils import TestCase, run_tests
4+
5+
from ..testing_utilities import lower_graph_testing
56

67

78
class TestFakeTensors(TestCase):

tests/py/dynamo/conversion/__init__.py

Whitespace-only changes.

tests/py/dynamo/converters/test_adaptive_avgpool_aten.py renamed to tests/py/dynamo/conversion/test_adaptive_avgpool_aten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from torch.testing._internal.common_utils import run_tests
44
from torch_tensorrt import Input
55

6-
from harness import DispatchTestCase
6+
from .harness import DispatchTestCase
77

88

99
class TestAdaptiveAvgPoolConverter(DispatchTestCase):

tests/py/dynamo/converters/test_batchnorm_aten.py renamed to tests/py/dynamo/conversion/test_batchnorm_aten.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import torch
22
from torch.testing._internal.common_utils import run_tests
3-
from harness import DispatchTestCase
43
from torch_tensorrt import Input
54

5+
from .harness import DispatchTestCase
6+
67

78
class TestBatchNormConverter(DispatchTestCase):
89
def test_batchnorm(self):

0 commit comments

Comments
 (0)