Shortcuts

torch.fx.experimental.proxy_tensor.maybe_enable_thunkify

torch.fx.experimental.proxy_tensor.maybe_enable_thunkify()[source][source]

Within this context manager, if you are doing make_fx tracing, we will thunkify all SymNode compute and avoid tracing it into the graph unless it is actually needed. You should prefer to avoid using this as much as possible, as lazy evaluation of SymNode tracing can lead to long chains of thunks which will stack overflow if you evaluate them. However, this is currently sometimes necessary as there are buggy parts of PT2 which will fail with “s0 is not tracked with proxy” error due to insufficient tracing of SymNode computation.

Return type

Generator[None, None, None]

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