-
Notifications
You must be signed in to change notification settings - Fork 55
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
Implement persistent matmul scheduling #3812
base: main
Are you sure you want to change the base?
Conversation
I think this covers the motivation for #3616
There is still one case that fails, which we should fix. I'll create an issue for it.
Co-authored-by: Ryan Spring <[email protected]>
…ersistent_kernel_impl
!test |
Review updated until commit 0cbb3e6 Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
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.
LGTM.
Looks like some overlap with #3642. Do you plan to merge it first?
MLPBenchmarkTestParams{ | ||
.warp_specialization = true, | ||
.persistent_kernel = true}), | ||
[](const testing::TestParamInfo<MLPBenchmarkTestParams>& info) { | ||
std::stringstream ss; | ||
ss << (info.param.persistent_kernel ? "persistent" : "data_parallel"); | ||
ss << (info.param.persistent_kernel ? "persistent" : "dataparallel"); |
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.
Is this rename from a bad merge?
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.
I just hadn't merged #3642 in a while I think.
@@ -308,6 +308,10 @@ bool fillDefaultHopperHeuristic( | |||
|
|||
mparams->tile_sizes = {cta_tile, warp_tile}; | |||
|
|||
// Use warp specialization on hopper by default |
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.
I thought using warp specialization by default was causing some test failures.
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.
Not anymore. I think that was before integrating the warp tile split.
52d2bca
to
07c93c6
Compare
!test |
Grrr. Failures on ampere. Will fix before merging. |
!test |
Stacked on #3642
This is a followup to #3792 that implements persistent scheduling.
There is a current limitation that affects both persistent scheduling and "grid swizzling": if
MatmulOp
orLinearOp
are present in the fusion, we will hit inlining errors. This is because in that case we have a non-trivialAxisMapping
on theMmaOp
. The missing input dimensions are not tracked through the scheduling transforms (merges and splits) required for either grid swizzling or persistent scheduling. Because of this, I introduced three new parametrized tests matching the originalMLPBenchmarkTest
s but with_BroadcastInputs
suffix. These tests usefusedMultiplySum
instead oflinear
. Thepersistent
variant of the nonBroadcastInputs
tests are skipped until we fix the inlining issue.I currently observe a correctness issue in the
MLPBenchmarkTest.FwdEpilogueFusion_BroadcastInputs
test regardless of parametrization. This means that we are getting incorrect results even for data parallel scheduling. I confirmed this test also fails on main. I currently skip this test with a warning mesage.