pytorch/docs/source/fx.experimental.rst
Pian Pawakapan 6dddd6520d [dynamic shapes] add sym_and, sym_or (#150456)
This has been pretty helpful for the size-oblivious rewrite. Wanted the variadic args version to avoid `sym_or(a, sym_or(b, sym_or(c, d)))` in favor of `sym_or(a, b, c, d)`. Happy to change this to ban the 1-arg version.

This is better than plain and/or because the whole symbolic expression gets preserved, and if we guard on it or defer as a runtime assert, we preserve all branches.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150456
Approved by: https://github.com/laithsakka
2025-04-14 18:18:06 +00:00

75 lines
1.6 KiB
ReStructuredText

.. currentmodule:: torch.fx.experimental
torch.fx.experimental
=====================
.. warning::
These APIs are experimental and subject to change without notice.
torch.fx.experimental.symbolic_shapes
-------------------------------------
.. currentmodule:: torch.fx.experimental.symbolic_shapes
.. automodule:: torch.fx.experimental.symbolic_shapes
.. autosummary::
:toctree: generated
:nosignatures:
ShapeEnv
DimDynamic
StrictMinMaxConstraint
RelaxedUnspecConstraint
EqualityConstraint
SymbolicContext
StatelessSymbolicContext
StatefulSymbolicContext
SubclassSymbolicContext
DimConstraints
ShapeEnvSettings
ConvertIntKey
CallMethodKey
PropagateUnbackedSymInts
DivideByKey
InnerTensorKey
hint_int
is_concrete_int
is_concrete_bool
is_concrete_float
has_free_symbols
has_free_unbacked_symbols
definitely_true
definitely_false
guard_or_true
guard_or_false
guard_size_oblivious
sym_and
sym_eq
sym_or
constrain_range
constrain_unify
canonicalize_bool_expr
statically_known_true
lru_cache
check_consistent
compute_unbacked_bindings
rebind_unbacked
resolve_unbacked_bindings
is_accessor_node
torch.fx.experimental.proxy_tensor
-------------------------------------
.. currentmodule:: torch.fx.experimental.proxy_tensor
.. automodule:: torch.fx.experimental.proxy_tensor
.. autosummary::
:toctree: generated
:nosignatures:
make_fx
handle_sym_dispatch
get_proxy_mode
maybe_enable_thunkify
maybe_disable_thunkify