Skip to content

fix infinite recursion in ColoTracer on newer PyTorch versions#6420

Open
ssam18 wants to merge 1 commit intohpcaitech:mainfrom
ssam18:fix/fx-tracer-getattr-recursion
Open

fix infinite recursion in ColoTracer on newer PyTorch versions#6420
ssam18 wants to merge 1 commit intohpcaitech:mainfrom
ssam18:fix/fx-tracer-getattr-recursion

Conversation

@ssam18
Copy link
Copy Markdown

@ssam18 ssam18 commented Apr 19, 2026

Newer versions of PyTorch renamed _module_getattr to getattr in the Tracer class, so the _disable_module_getattr guard in ColoTracer._module_getattr was never reached, causing infinite recursion when computing metadata for get_attr nodes. Added a getattr override with the same early-return guard to cover both old and new PyTorch versions. Fixes #6413

@ssam18 ssam18 requested a review from a team as a code owner April 19, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: RuntimeError(f"Could not compute metadata for {kind} target {target}: {e}")

1 participant