Shortcuts

torch.fx.experimental.symbolic_shapes.statically_known_true

torch.fx.experimental.symbolic_shapes.statically_known_true(x)[source]

Returns True if x can be simplified to a constant and is true.

Note

This function doesn’t introduce new guards, so the expression may end up evaluating to true at runtime even if this function returns False.

Parameters

x (bool, SymBool) – The expression to try statically evaluating

Return type

bool

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources