Change8
Error2 reports

Fix RefResolutionError

in PyTorch

Solution

RefResolutionError in PyTorch FX usually arises when tracing a module and the tracer encounters a symbol (e.g., a function or module) it cannot resolve within the FX graph's scope. To fix this, either make sure all necessary modules/functions are explicitly passed as arguments or attributes of the module being traced, or use `torch.fx.wrap` to expose external functions/modules to the tracer. Consider tracing at a higher level or restructuring your code to improve traceability if the problem persists.

Timeline

First reported:Mar 13, 2026
Last reported:Mar 13, 2026

Need More Help?

View the full changelog and migration guides for PyTorch

View PyTorch Changelog