Repository navigation
trimul-gpumode: fix kernel_global on H100 - #1374
Closed
jaygala223 wants to merge 1 commit into
Closed
jaygala223 wants to merge 1 commit into
jaygala223 wants to merge 1 commit into
Conversation
|
This PR changes source code for the following kernel(s): If you have the kernel-bot build permissions, then trigger |
|
Hi @jaygala223, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/huggingface/kernels-community/blob/main/CONTRIBUTING.md for more details. |
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.
Related issue
Closes #1256
What does this PR do?
Fixes
kernel_globalintrimul-gpumode, which crashes on every GPU that isn't capability 8.x.Motivation
On H100,
kernel_global(which is also whatbenchmarks/benchmark.pycalls) fails with:@iemAnshuman found this in #1256 and suggested the fix. They didn't have an H100 to check it on, and I do.
Changes
two_mm_kernel_configs_wrappernow returnsget_optimal_two_mm_config_h100, which is whattwo_mmcalls with(B, seq_len, K)two_mm. Its config table was already disabled withand False, so B200 now autotunes like the other GPUstl._experimental_make_tensor_descriptor->tl.make_tensor_descriptor(the old name was removed in Triton 3.4)I didn't touch ROCm. The issue also mentions that MI100 reports capability 9 and takes the H100 path; I can look at that in a follow-up.
Testing
On an H100 NVL, with torch 2.15.0 + Triton 3.9.0 and again with torch 2.13.0 + Triton 3.7.1:
kernel_globalfails with the TypeError abovekernel_globalmatches the reference frombenchmarks/benchmark.py(atol/rtol 2e-2) on 8 shapes from (1, 128, 128) to (1, 1024, 1024) with random masks. Max abs diff is 4e-4There are no tests for this kernel yet, and CI runs on sm89, which only reaches the capability 8 path, so I didn't add one.
Checklist
@sayakpaul @danieldk I'm not on the vouch list for this repo, so the bot will probably close this. Could one of you vouch for me or reopen it? I had huggingface/kernels#675 merged earlier.