Skip to content

Print scheduled fusion instead of kernel for NVFUSER_DUMP=fusion_ir#3769

Merged
wujingyue merged 1 commit intomainfrom
fusion_ir_dump_fix
Jan 28, 2025
Merged

Print scheduled fusion instead of kernel for NVFUSER_DUMP=fusion_ir#3769
wujingyue merged 1 commit intomainfrom
fusion_ir_dump_fix

Conversation

@jacobhinkle
Copy link
Collaborator

PR #3468 changed to using CompiledKernel and in the shuffle, we switched from using the incoming fusion before compilation to the lowered kir::Kernel. This PR just moves the printing to occur just before lowering, inside the constructor for CompiledKernel. I believe this is enough to restore the previous behavior.

Fixes #3765

PR #3468 changed to using `CompiledKernel` and in the shuffle, we
switched from using the incoming fusion before compilation to the
lowered `kir::Kernel`. This PR just moves the printing to occur just
before lowering, inside the constructor for `CompiledKernel`. I believe
this is enough to restore the previous behavior.

Fixes #3765
@jacobhinkle
Copy link
Collaborator Author

!test

@github-actions
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
⚡ Recommended focus areas for review

Debug Dump

The PR modifies the debug dump behavior to print the scheduled fusion instead of the kernel. Verify that this change restores the previous behavior and does not introduce any issues.

if (isDebugDumpEnabled(DebugDumpOption::FusionIr)) {
  fusion->print();
} else if (isDebugDumpEnabled(DebugDumpOption::FusionIrMath)) {
  fusion->printMath();
}

Copy link
Collaborator

@naoyam naoyam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix!

@jacobhinkle
Copy link
Collaborator Author

I think these failures are unrelated.

@wujingyue wujingyue merged commit 5b9f171 into main Jan 28, 2025
39 of 42 checks passed
@wujingyue wujingyue deleted the fusion_ir_dump_fix branch January 28, 2025 16: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.

NVFUSER_DUMP=fusion_ir dumps Kernel IR

3 participants