Skip to content

Commit b620a1f

Browse files
committed
fix: Reorganize testing directories
1 parent 0b51cf9 commit b620a1f

Some content is hidden

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

44 files changed

+104
-56
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,20 @@ commands:
768768
- store_artifacts:
769769
path: /tmp/testlogs
770770

771+
test-dynamo-shared_utilities:
772+
description: "Test Dynamo shared utilities tests"
773+
steps:
774+
- run:
775+
name: Run Dynamo shared_utilities tests
776+
command: |
777+
cd tests/py/dynamo/shared_utilities/
778+
pytest --junitxml=/tmp/artifacts/test_results/dynamo/shared_utilities/test_results.xml
779+
780+
- store_test_results:
781+
path: /tmp/artifacts
782+
- store_artifacts:
783+
path: /tmp/testlogs
784+
771785
test-dynamo-models_torch_compile:
772786
description: "Test the Dynamo models via torch_compile path"
773787
steps:
@@ -1080,6 +1094,7 @@ jobs:
10801094
- dump-test-env
10811095
- test-dynamo-converters
10821096
- test-dynamo-torch_compile
1097+
- test-dynamo-shared_utilities
10831098
- test-dynamo-models_torch_compile
10841099
- test-dynamo-models_torch_export
10851100

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/converters/__init__.py

Whitespace-only changes.

tests/py/dynamo/converters/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

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):

tests/py/dynamo/converters/test_binary_ops_aten.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
from typing import Callable
21
import unittest
2+
from typing import Callable
33

44
import torch
55
import torch.nn as nn
6-
76
from parameterized import parameterized
87
from torch.testing._internal.common_utils import run_tests
9-
from harness import DispatchTestCase
108
from torch_tensorrt import Input
119

10+
from .harness import DispatchTestCase
11+
1212
NEED_TEST_BOTH_CONSTANTS_CASE = True
1313

1414
elementwise_ops = [

0 commit comments

Comments
 (0)