W3cubDocs

/PyTorch 2.9

ShapeEnvSettings

class torch.fx.experimental.symbolic_shapes.ShapeEnvSettings(allow_scalar_outputs, allow_dynamic_output_shape_ops, assume_static_by_default, specialize_zero_one, duck_shape, prefer_deferred_runtime_asserts_over_guards, trace_asserts) [source]

Encapsulates all shape env settings that could potentially affect FakeTensor dispatch. Used when creating dispatch cache keys.

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.fx.experimental.symbolic_shapes.ShapeEnvSettings.html