Refactor outer reduction heuristic in addition to Blackwell#164384
Closed
PaulZhang12 wants to merge 8 commits intogh/PaulZhang12/31/basefrom
Closed
Refactor outer reduction heuristic in addition to Blackwell#164384PaulZhang12 wants to merge 8 commits intogh/PaulZhang12/31/basefrom
PaulZhang12 wants to merge 8 commits intogh/PaulZhang12/31/basefrom
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/164384
Note: Links to docs will display an error until the docs builds have been completed. ❌ 9 New Failures, 4 Unrelated FailuresAs of commit 5892a84 with merge base 2ce894b ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock. Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions: ``` M = 32768 N = 512 Old Heuristic: 901 GB/s New Heuristic: 1222 GB/s M = 32768 N = 1024 Old Heuristic: 1584 GB/s New Heuristic: 1807 GB/s M = 32768 N = 2048 Old Heuristic: 1898 GB/s New Heuristic: 2146 GB/s M = 32768 N = 4096 Old Heuristic: 2102 GB/s New Heuristic: 2096 GB/s ``` Larger N requires a fused backwards kernel, autotuning results for larger N are similar cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben [ghstack-poisoned]
Contributor
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stack from ghstack (oldest at bottom):
Previously, the outer reduction heuristics were a bit messy. This PR simplifies the heuristic, while also adding considerations for shrinking num_warps, as preferred by hopper and blackwell, along with accounting for rnumel when constructing rblock.
Bandwidth numbers from Quack shapes RMSNorm backwards on B200 that contains outer reductions:
Larger N requires a fused backwards kernel, autotuning results for larger N are similar
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @chenyang78