W3cubDocs

/PyTorch 2.9

torch.fx.experimental.symbolic_shapes.has_static_value

torch.fx.experimental.symbolic_shapes.has_static_value(a) [source]

User-code friendly utility to check if a value is static or dynamic. Returns true if given a constant, or a symbolic expression with a fixed value.

Parameters

a (Union[SymBool, SymFloat, SymInt, bool, float, int]) – Object to test

Return type

bool

© 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.has_static_value.html