Rate this Page

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