File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -233,15 +233,13 @@ def __init__(
233
233
allow_dynamic_output_shape_ops = config .capture_dynamic_output_shape_ops ,
234
234
frame_id = frame_state ["_id" ],
235
235
)
236
- if config .dynamic_shapes
237
- or config .automatic_dynamic_shapes
238
- or not config .assume_static_by_default
236
+ if config .automatic_dynamic_shapes or not config .assume_static_by_default
239
237
else None ,
240
238
# TODO (tmanlaibaatar) Remove this once we always lift params and buffers
241
239
allow_non_fake_inputs = True if self .export else False ,
242
240
)
243
241
self .tracing_context : TracingContext = TracingContext (fake_mode )
244
- if config . dynamic_shapes :
242
+ if fake_mode . shape_env is not None :
245
243
# Register a SHAPE_ENV guard to make sure we setup shape guards
246
244
# that show up in ShapeEnv
247
245
self .guards .add (ShapeEnvSource ().make_guard (GuardBuilder .SHAPE_ENV ))
You can’t perform that action at this time.
0 commit comments