Skip to content

Commit 78b56b4

Browse files
fix dynamo converter test case failure (#3594)
1 parent e6708c9 commit 78b56b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/py/dynamo/conversion/harness.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,12 @@ def generate_graph(
368368
tuple(torch_export_inputs),
369369
dynamic_shapes=torch_export_dynamic_shapes,
370370
)
371+
# for the dynamo tracer, with dynamic shapes,
372+
# we need to apply the post lowering passes especially remove _assert_scalar nodes
373+
for dynamic_shape_spec in torch_export_dynamic_shapes.values():
374+
if len(dynamic_shape_spec) > 0:
375+
enable_passes = True
376+
break
371377
if enable_passes:
372378
exported_program = pre_export_lowering(exported_program, settings)
373379
exported_program = exported_program.run_decompositions(

0 commit comments

Comments
 (0)