-
Notifications
You must be signed in to change notification settings - Fork 53
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
Resolve conflicts by recomputation #3625
base: main
Are you sure you want to change the base?
Conversation
5d1d07e
to
7380a40
Compare
!test |
!test |
!test |
@@ -133,6 +120,30 @@ bool ResizeScheduler::canScheduleCompileTime(Fusion* fusion) { | |||
return false; | |||
} | |||
|
|||
for (auto out_tv : ir_utils::filterByType<TensorView>(fusion->outputs())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is needed since the non-exclusivity check is dropped. It was redundant before.
tests/cpp/test_resize.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes here are due to the change of the output type of getNonExclusiveResizeInfo
and are just mechanical changes.
Stacked on top of #3611
This PR resolves the conflicts found by the analysis added at #3611 by recomputing slice/pad input tensors. With this, fusions like
ResizeSchedulerTest.SliceRotateCatResidual
can be scheduled as a single kernel by the resize scheduler.Recomputation is not the only possible way to resolve conflicts. We could do, for example, cache a block of a input tensor such that multiple uses of the input can be done by just using the block. This would look more like a produce-based scheduling approach. I prototyped that approach here, but it didn't perform well for RoPE.