Repository navigation
[JAX] Fall back from the V2 grouped GEMM on Hopper below cuBLAS 13.4 - #3923
Merged
Merged
Conversation
Signed-off-by: Teddy Do <tdophung@nvidia.com>
Collaborator
Author
|
/te-ci L1 jax |
6 of 13 tasks
tdophung
marked this pull request as ready for review
November 23, 2026 23:58
Contributor
[Medium impact] The PR appears safe to merge. SummaryAdds a runtime cuBLAS check before JAX selects V2 grouped GEMM on Hopper.
Reviews (1) · Last reviewed commit: "Merge branch 'main' into te-jax-v2-gemm-..." · Reviewed by Greptile |
jberchtold-nvidia
approved these changes
Nov 24, 2026
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.
Description
On Hopper,
nvte_grouped_gemmneeds cuBLAS 13.4+ (check_grouped_gemm_requirementsincublaslt_grouped_gemm.cu). The JAX router_is_v2_grouped_gemm_supportedonly checks that TE was built with the V2 kernel and that the GPU is SM90+. So with cuBLAS 13.3 on Hopper, BF16 grouped GEMM is sent to the V2 kernel and fails at run time, even though the legacy grouped GEMM handles it fine. This came up in #3908's review.This PR makes the router decline the V2 kernel on SM90 when the run-time cuBLAS is older than 13.4, so those calls take the legacy path. With
NVTE_JAX_ENFORCE_V2_GROUPED_GEMM=1, the error now says why. Blackwell, and Hopper with cuBLAS 13.4+, are unchanged.Type of change
Changes
transformer_engine/jax/cpp_extensions/gemm.py:_is_v2_grouped_gemm_supportedreturns unsupported on SM90 below cuBLAS 13.4.tests/jax/test_custom_call_compute.py:test_v2_grouped_gemm_hopper_cublaschecks the decision with a mocked compute capability and cuBLAS version.Checklist: