33from torch ._dynamo .testing import make_test_cls_with_patches
44
55try :
6- from . import test_functions , test_misc , test_modules , test_repros , test_unspec
6+ from . import (
7+ test_export ,
8+ test_functions ,
9+ test_misc ,
10+ test_modules ,
11+ test_repros ,
12+ test_subgraphs ,
13+ test_unspec ,
14+ )
715except ImportError :
16+ import test_export
817 import test_functions
918 import test_misc
1019 import test_modules
1120 import test_repros
21+ import test_subgraphs
1222 import test_unspec
1323
24+ import unittest
25+
1426
1527def make_dynamic_cls (cls ):
1628 return make_test_cls_with_patches (
@@ -23,6 +35,145 @@ def make_dynamic_cls(cls):
2335DynamicShapesReproTests = make_dynamic_cls (test_repros .ReproTests )
2436DynamicShapesNNModuleTests = make_dynamic_cls (test_modules .NNModuleTests )
2537DynamicShapesUnspecTests = make_dynamic_cls (test_unspec .UnspecTests )
38+ DynamicShapesExportTests = make_dynamic_cls (test_export .ExportTests )
39+ DynamicShapesSubGraphTests = make_dynamic_cls (test_subgraphs .SubGraphTests )
40+
41+
42+ # DynamicShapesFunctionTests
43+ unittest .expectedFailure (
44+ DynamicShapesFunctionTests .test_len_tensor_dynamic_shapes
45+ # TypeError: 'torch._C.SymIntNode' object cannot be interpreted as an integer
46+ )
47+
48+ unittest .expectedFailure (
49+ DynamicShapesFunctionTests .test_tensor_len_dynamic_shapes
50+ # TypeError: 'torch._C.SymIntNode' object cannot be interpreted as an integer
51+ )
52+
53+
54+ # DynamicShapesReproTests
55+ unittest .expectedFailure (
56+ DynamicShapesReproTests .test_reformer_eval_dynamic_shapes
57+ # TypeError: 'torch._C.SymIntNode' object cannot be interpreted as an integer
58+ )
59+
60+ unittest .expectedFailure (
61+ DynamicShapesReproTests .test_reformer_train_dynamic_shapes
62+ # TypeError: 'torch._C.SymIntNode' object cannot be interpreted as an integer
63+ )
64+
65+ unittest .expectedFailure (
66+ DynamicShapesReproTests .test_issue175_dynamic_shapes
67+ # TypeError: 'torch._C.SymIntNode' object cannot be interpreted as an integer
68+ )
69+
70+ unittest .expectedFailure (
71+ DynamicShapesReproTests .test_do_paste_mask_dynamic_shapes
72+ # aten.min.dim - couldn't find symbolic meta function/decomposition
73+ )
74+
75+ unittest .expectedFailure (
76+ DynamicShapesReproTests .test_convert_boxes_to_pooler_format_dynamic_shapes
77+ # Could not infer dtype of torch._C.SymIntNode
78+ )
79+
80+ unittest .expectedFailure (
81+ DynamicShapesReproTests .test_ellipsis_dynamic_shapes
82+ # Cannot call sizes() on tensor with symbolic sizes/strides
83+ )
84+
85+ unittest .expectedFailure (
86+ DynamicShapesReproTests .test_hf_t5_forward_dynamic_shapes
87+ # Cannot call sizes() on tensor with symbolic sizes/strides
88+ )
89+
90+ unittest .expectedFailure (
91+ DynamicShapesReproTests .test_reformer_sorting_dynamic_shapes
92+ # Unable to cast Python instance to C++ type
93+ )
94+
95+ unittest .expectedFailure (
96+ DynamicShapesReproTests .test_boxes_len_dynamic_shapes
97+ # Unable to cast Python instance to C++ type
98+ )
99+
100+ unittest .expectedFailure (
101+ DynamicShapesReproTests .test_guard_fail_tensor_bool_dynamic_shapes
102+ # RuntimeError: aten.allclose.default - couldn't find symbolic meta function/decomposition
103+ )
104+
105+ # DynamicShapesMiscTests
106+ unittest .expectedFailure (
107+ DynamicShapesMiscTests .test_unsupported_fake_tensor_dynamic_shapes
108+ # aten.quantize_per_tensor.default - couldn't find symbolic meta function/decomposition
109+ )
110+ unittest .expectedFailure (
111+ DynamicShapesMiscTests .test_module_deepcopy_dynamic_shapes
112+ # aten.squeeze_.dim - couldn't find symbolic meta function/decompositio
113+ )
114+
115+ # DynamicShapesUnspecTests
116+ unittest .expectedFailure (
117+ DynamicShapesUnspecTests .test_unspec_float_precision_dynamic_shapes
118+ # float() argument must be a string or a real number, not 'torch._C.SymIntNode'
119+ )
120+
121+
122+ # DynamicShapesNNModuleTests
123+ unittest .expectedFailure (
124+ DynamicShapesNNModuleTests .test_unsupportedmethod_dynamic_shapes
125+ # aten.squeeze_.dim - couldn't find symbolic meta function/decomposition
126+ )
127+
128+ unittest .expectedFailure (
129+ DynamicShapesNNModuleTests .test_unsupportedmodule_dynamic_shapes
130+ # aten.squeeze_.dim - couldn't find symbolic meta function/decomposition
131+ )
132+
133+ unittest .expectedFailure (
134+ DynamicShapesNNModuleTests .test_self_mutating1_dynamic_shapes
135+ # aten.squeeze_.dim - couldn't find symbolic meta function/decomposition
136+ )
137+
138+ unittest .expectedFailure (
139+ DynamicShapesNNModuleTests .test_call_fn_with_non_const_inputs_safe_dynamic_shapes
140+ # aten.squeeze_.dim - couldn't find symbolic meta function/decomposition
141+ )
142+
143+
144+ # DynamicShapesExportTests
145+ unittest .expectedFailure (
146+ DynamicShapesExportTests .test_export_compare_optimize_with_make_fx_dynamic_shapes
147+ )
148+ unittest .expectedFailure (
149+ DynamicShapesExportTests .test_export_with_constant_list_nonzero_dynamic_shapes
150+ )
151+ unittest .expectedFailure (
152+ DynamicShapesExportTests .test_export_with_constant_list_nonzero_free_function_dynamic_shapes
153+ )
154+ unittest .expectedFailure (
155+ DynamicShapesExportTests .test_export_with_constant_tuple_nonzero_dynamic_shapes
156+ )
157+ unittest .expectedFailure (
158+ DynamicShapesExportTests .test_export_with_stack_trace_dynamic_shapes
159+ )
160+ unittest .expectedFailure (
161+ DynamicShapesExportTests .test_zeroes_in_new_shape_scalar_out_dynamic_shapes
162+ )
163+ unittest .expectedFailure (
164+ DynamicShapesExportTests .test_zeroes_in_new_shape_scalar_out_permute_dupe_and_bypass_dynamic_shapes
165+ )
166+ unittest .expectedFailure (
167+ DynamicShapesExportTests .test_zeroes_in_new_shape_scalar_out_permute_dynamic_shapes
168+ )
169+
170+
171+ # DynamicShapesSubGraphTests
172+ unittest .expectedFailure (
173+ DynamicShapesSubGraphTests .test_enumerate_not_break_graph_dynamic_shapes
174+ )
175+ unittest .expectedFailure (DynamicShapesSubGraphTests .test_restore_state_dynamic_shapes )
176+
26177
27178if __name__ == "__main__" :
28179 from torch ._dynamo .test_case import run_tests
0 commit comments