-
Notifications
You must be signed in to change notification settings - Fork 82
Unswizzle before grid reduction in split-K #1534
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
Merged
Merged
Changes from all commits
Commits
Show all changes
84 commits
Select commit
Hold shift + click to select a range
96225e8
Start lowering serial grid reduction
jacobhinkle f9d2d01
Add grid_serialization.{cpp,h}
jacobhinkle 6454b06
Add requestSerialGridReduction
jacobhinkle 1142e44
Disable previous changes to indexing pass.
jacobhinkle 1368ba8
Call insertGridSerializationSyncs pass
jacobhinkle b97db45
Remove file added by mistake
jacobhinkle ac2da9d
Fix formatting lintrunner messed up
jacobhinkle ebef797
Bump num_reduction_op_attr
jacobhinkle dcd8606
Add test
jacobhinkle e196fa7
Fix sync insertion in lowering pass.
jacobhinkle 8be320a
Fix missing allocation of sync flag buffer
jacobhinkle 41b125f
Allocate global work buffer. Index is zero for now
jacobhinkle e465d96
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle 34d623c
Taking a stab at replay/indexing of intermediate
jacobhinkle 910ff09
Use fullSelfReplay and getGlobalConsumerStridedIndices
jacobhinkle 507cf47
Infer shape using allocation domain instead of root
jacobhinkle e44ef7e
Update comments
jacobhinkle 8a3134e
Hoist index scalar.
jacobhinkle 327573c
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle d27a675
Clean up comments.
jacobhinkle 46c70b6
Update NVFuserTest.Pipeline_CUDA
jacobhinkle 6d2089d
Merge branch 'main' into lower_serial_reduction
jacobhinkle 751f326
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle f4ad5ff
Merge branch 'main' into lower_serial_reduction
jacobhinkle 1149b43
Clean up sum val computation
jacobhinkle 94e55b8
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle f2d7461
Clean up comments and reset sync pattern properly
jacobhinkle a864184
Fix compile error
jacobhinkle c236810
Merge branch 'main' into lower_serial_reduction
jacobhinkle 819a6e0
Re-use TensorDomain instead of replaying
jacobhinkle cf42527
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle 449a296
Copy domains to create new TensorDomain instead of reusing
jacobhinkle 27e449a
Allocate work buffer like leaf of output
jacobhinkle c6ddebf
Merge remote-tracking branch 'origin/main' into lower_serial_reduction
jacobhinkle 2c3278b
Use serial grid reduction in split-K
jacobhinkle 4e40d68
Set proper dtype for init in MmaOp
jacobhinkle 7bfa709
Restore split-k benchmarks
jacobhinkle fc07a9a
Fix after rebase
jacobhinkle 49b7feb
Set proper dtype for init in MmaOp
jacobhinkle fe8fbf5
Naive first step. Doesn't work yet
jacobhinkle ef4b3f3
Fix typo
jacobhinkle d5febec
Add debug output
jacobhinkle d358071
TMP add more debug output, comments
jacobhinkle 362bde9
Fix up to get kernel running, but still have bank conflicts
jacobhinkle 4c71cee
Delint test, add printout of bank conflict
jacobhinkle 96fa361
Undo special handling for bothWays
jacobhinkle 5ee9421
Vectorize smem store
jacobhinkle 21ece7c
Remove debug print
jacobhinkle 8bc4d0e
Use smem in all splitk tests (with/wo batch/bias)
jacobhinkle 49edbfe
[WIP] Add benchmarks for nanogpt bwd split-K sizes
jacobhinkle bc50c8d
Vectorized serial grid reduction
jacobhinkle f740f12
Remove debug prints
jacobhinkle 71bae3a
Use loadGlobalToLocal instead of loadGenericVolatile
jacobhinkle 747b466
Use smem_epilogue when possible in benchmarks
jacobhinkle 0b13a59
Vectorize innermost non-trivial dimension.
jacobhinkle 21203ea
Clean up check for use_smem_epilogue in benchmark
jacobhinkle aef008d
Set manual seed before generating inputs in SingleMatmulBase
jacobhinkle e36740d
Disable double buffering smem writes
jacobhinkle 90b0eae
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle 907e877
Add smem_epilogue:{0,1} cases in benchmarks
jacobhinkle 5976c43
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle b04a23f
Split inner axis if vec width is too large
jacobhinkle 3fcdfed
Delint
jacobhinkle 687c13a
Delint benchmark
jacobhinkle 7f23082
Guard against limited smem in test
jacobhinkle b6b5287
Fix missing stage number in test smem check
jacobhinkle c0dcd76
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle e848abe
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle af710d6
Fix batch split-K tests.
jacobhinkle 1c11d1f
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle 629bcb1
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle 27db63e
Revert inadvertent change to benchmark
jacobhinkle 3ebc733
Comment on bool options
jacobhinkle c7cfcaf
Move definition of smem_epilogue further down
jacobhinkle 5672f33
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle e6377f4
Refactor splitk_sum scheduling into separate function
jacobhinkle c7f8bac
Clean up comments
jacobhinkle b20cc73
Simplify scheduleSplitKSum and fix comment formatting
jacobhinkle 26dc559
Fix comments
jacobhinkle 83ec210
Fix comment
jacobhinkle 65da699
Merge remote-tracking branch 'origin/main' into splitk_smem_epilogue
jacobhinkle 9929255
Fix comment formatting
jacobhinkle 9fea8d6
Merge branch 'main' into splitk_smem_epilogue
jacobhinkle 590b9a8
Fix another clang-format wrapped comment
jacobhinkle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 am vectorizing the store to smem, but without this I hit
For a local or shared tensor, block-parallelized dimensions don't affect the allocation, so we should just skip them here I think.