Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThunderFX: Improve the Repro script to include information about the split reason and submodules. #1461

Closed
kiya00 opened this issue Nov 20, 2024 · 1 comment · Fixed by #1488
Assignees
Labels
debugging enhancement New feature or request

Comments

@kiya00
Copy link
Collaborator

kiya00 commented Nov 20, 2024

🚀 Feature

As a follow-up of #1380

Besides the repro function, we also want to include the information (in the form of comments) describing how thunder segmented the program, and what operations were sent to inductor (and thus unsupported by thunder)

Motivation

Debuggability improvement. Pulling repros out of dependencies is important for dev velocity.

Pitch

I'm thinking about adding the split module structure and the split_reason in the subgraph_info in the comment of the repro script

"""
The graph is splited in 3 submodules:
GraphModule(
  (thunder_1): ThunderModule(
    (_model): GraphModule()
  )
  (inductor_2): OptimizedModule(
    (_orig_mod): GraphModule()
  )
  (thunder_3): ThunderModule(
    (_model): GraphModule()
  )
Break reasons:
  Break Reason 1:
     node with name: sinc and target: <built-in method sinc of type object at 0x72c659c6a080> only has an automatic torch fallback in thunder.
"""

cc: @mruberry @tfogal @IvanYashchuk

cc @apaz-cli

@mruberry
Copy link
Collaborator

Adding the splits and their reasons would be great! Adding them as a comment makes sense.

In the future it may be interesting to think about reproducing each split separately, or even reproducing arbitrary subgraphs from the FX graph. Features like that might need to be careful about replicating context manager enters and exits they're contained within.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants