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

Add a dump option to dump a fusion IR graph #3603

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

naoyam
Copy link
Collaborator

@naoyam naoyam commented Dec 17, 2024

NVFUSER_DUMP=fusion_ir_graph saves the dot representation of a fusion before lowering to a file named like __tmp_fusion_ir_graph_inner_persistent_f0_c1_r0_g0.dot.

Example visualization: #3498 (comment)

Comment on lines +116 to +121
{"fusion_ir_concretized", DebugDumpOption::FusionIrConcretized},
{"fusion_ir_graph", DebugDumpOption::FusionIrGraph},
{"fusion_ir_math", DebugDumpOption::FusionIrMath},
{"fusion_ir_original", DebugDumpOption::FusionIrOriginal},
{"fusion_ir_presched", DebugDumpOption::FusionIrPresched},
{"fusion_ir_preseg", DebugDumpOption::FusionIrPreseg},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just changed to the alphabetical ordering

@naoyam
Copy link
Collaborator Author

naoyam commented Dec 17, 2024

!build

@naoyam naoyam requested a review from wujingyue December 17, 2024 19:40
@@ -304,6 +305,9 @@ void KernelExecutor::compile(
NVF_ERROR(
!fusion->outputs().empty(), "No output found for this kernel, aborting.");

createKernelId(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove

createKernelId(
scheduler_type, fusion_id_, concrete_id_, runtime_id_, group_id_);
? I don't think there's value to create twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just moved it here.

I also am not sure if this should be a stateful operation. It seems just returning a string seems sufficient, but didn't bother to do a further cleanup.

@naoyam naoyam merged commit ffd186e into main Dec 17, 2024
17 checks passed
@naoyam naoyam deleted the dump_fusion_ir_graph branch December 17, 2024 22:18
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.

2 participants