-
Notifications
You must be signed in to change notification settings - Fork 79
RemoveEmptyPass optimization pass to remove empty tensors #543
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
Changes from all commits
6061f3b
4bce330
6c64915
6fb368c
0d8b4fc
436832f
50d763f
56dcfae
c776878
fb1b670
f6487e0
b9953f7
32ab55a
7b1d763
bc57aa3
cf24bd0
4d0c656
d1532c2
4f83f3f
940dd73
5349160
267011c
d84f7fe
ea2374c
d7d43fc
1afed11
b5c46ef
6d62c13
acdfa4c
3591bfa
53d51ed
b4c2372
4373c1b
0a1d21f
f2270e6
fa7aed1
d1c4b8f
c1c386f
7ed25be
6cecc75
9a61d1e
9609922
8d45d43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -673,6 +673,12 @@ FusionKernelRuntime::FusionKernelRuntime( | |
| optimization::OptimizationPass<optimization::PreSegmenter>::runPass( | ||
| fusion.get()); | ||
|
|
||
| if (isDebugDumpEnabled(DebugDumpOption::FusionIrPreseg)) { | ||
| std::cout << "Fusion IR after pre-segmenter optimization passes:" | ||
| << std::endl; | ||
| fusion->printMath(); | ||
| } | ||
|
Comment on lines
+676
to
+680
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New dump option |
||
|
|
||
| all_tvs_ = ir_utils::allTvs(fusion.get()); | ||
|
|
||
| // Run segmentation on the copied fusion | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,10 +9,13 @@ | |
|
|
||
| #include <optimization/add_axioms.h> | ||
| #include <optimization/consecutive_cast.h> | ||
| #include <optimization/remove_empty.h> | ||
|
|
||
| namespace nvfuser::optimization { | ||
|
|
||
| void PreSegmenter::runPass(Fusion* fusion) { | ||
| // Replace TensorViews with zero extent. Outputs and inputs may still be empty | ||
| OptimizationPass<RemoveEmptyPass>::runPass(fusion); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I placed this pass first since I assumed we may want to do any DCE passes before other patterns are matched. |
||
| // removes consecutive cast operations | ||
| OptimizationPass<ConsecutiveCastPass>::runPass(fusion); | ||
| OptimizationPass<AddAxiomsPass>::runPass(fusion); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.