Skip to content

Commit c8c906e

Browse files
committed
fix: Reorganize testing directories
1 parent a65c95c commit c8c906e

Some content is hidden

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

71 files changed

+289
-229
lines changed

.circleci/config.yml

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

757757
# =================== Dynamo tests start ======================== #
758758

759-
test-dynamo-torch_compile:
760-
description: "Test Dynamo torch_compile tests"
759+
test-dynamo-backend:
760+
description: "Test Dynamo backend tests"
761761
steps:
762762
- run:
763-
name: Run Dynamo torch_compile tests
763+
name: Run Dynamo backend tests
764764
command: |
765765
cd tests/py/dynamo/backend/
766-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/torch_compile/test_results.xml
766+
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
767+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/backend/test_results.xml $TESTS_TO_RUN
768+
769+
- store_test_results:
770+
path: /tmp/artifacts
771+
- store_artifacts:
772+
path: /tmp/testlogs
773+
774+
test-dynamo-shared_utilities:
775+
description: "Test Dynamo shared utilities tests"
776+
steps:
777+
- run:
778+
name: Run Dynamo lowering, partitioning, runtime tests
779+
command: |
780+
cd tests/py/dynamo/
781+
TESTS_TO_RUN=$(circleci tests glob "runtime/test_*.py" "partitioning/test_*.py" "lowering/test_*.py" | circleci tests split --split-by=timings)
782+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/shared_utilities/test_results.xml $TESTS_TO_RUN
767783
768784
- store_test_results:
769785
path: /tmp/artifacts
@@ -808,9 +824,9 @@ commands:
808824
- run:
809825
name: Run Dynamo converter tests
810826
command: |
811-
cd tests/py/dynamo/converters
827+
cd tests/py/dynamo/conversion
812828
TESTS_TO_RUN=$(circleci tests glob "test_*.py" | circleci tests split --split-by=timings)
813-
pytest --junitxml=/tmp/artifacts/test_results/dynamo/converters/test_results.xml $TESTS_TO_RUN
829+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/conversion/test_results.xml $TESTS_TO_RUN
814830
815831
- store_test_results:
816832
path: /tmp/artifacts
@@ -1103,7 +1119,8 @@ jobs:
11031119
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
11041120
- dump-test-env
11051121
- test-dynamo-converters
1106-
- test-dynamo-torch_compile
1122+
- test-dynamo-backend
1123+
- test-dynamo-shared_utilities
11071124
- test-dynamo-models_torch_compile
11081125
- test-dynamo-models_torch_export
11091126

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import torch
22
import torch_tensorrt
33
from torch.testing._internal.common_utils import TestCase, run_tests
4-
from utils import lower_graph_testing
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_abs_aten.py renamed to tests/py/dynamo/conversion/test_abs_aten.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import torch
22
import torch.nn as nn
3-
from harness import DispatchTestCase
43
from parameterized import parameterized
54
from torch.testing._internal.common_utils import run_tests
6-
from torch_tensorrt import Input
5+
6+
from .harness import DispatchTestCase
77

88

99
class TestAbsConverter(DispatchTestCase):

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import torch
22
import torch.nn as nn
3-
from harness import DispatchTestCase
43
from parameterized import parameterized
54
from torch.testing._internal.common_utils import run_tests
6-
from torch_tensorrt import Input
5+
6+
from .harness import DispatchTestCase
77

88

99
class TestAcosConverter(DispatchTestCase):

0 commit comments

Comments
 (0)