Skip to content

[Core] Fix L40 cublas heuristics - #3440

Open
jberchtold-nvidia wants to merge 2 commits into
NVIDIA:mainfrom
jberchtold-nvidia:jberchtold/fix-l40-cublas-heuristic
Open

[Core] Fix L40 cublas heuristics#3440
jberchtold-nvidia wants to merge 2 commits into
NVIDIA:mainfrom
jberchtold-nvidia:jberchtold/fix-l40-cublas-heuristic

Conversation

@jberchtold-nvidia

Copy link
Copy Markdown
Collaborator

Description

In certain cases on L40 we would allow a cuBLASLt heuristic that performed split-K with partial results stored in BF16. This lead to some loss of precision in the results. This PR fixes this by disallowing such heuristics

H100 and above were not observed to be affected by this.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

  • Disallow split-K BF16 cuBLASLt heuristics

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@jberchtold-nvidia

Copy link
Copy Markdown
Collaborator Author

/te-ci L1

@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR prevents reduced-precision split-K reductions for BF16 GEMMs using FP32 computation.

  • Restricts eligible cuBLASLt reduction schemes to compute-type reduction for BF16 inputs and output.
  • Keeps non-split algorithms and split-K algorithms with FP32 partial reduction eligible.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete correctness, compatibility, or security defect identified.

The new preference narrows heuristic selection only for the affected all-BF16 FP32-compute configuration while preserving non-split and compute-type split-K algorithms.

Important Files Changed

Filename Overview
transformer_engine/common/gemm/cublaslt_gemm.cu Adds a targeted cuBLASLt preference that excludes BF16 output-type split-K reduction for all-BF16 GEMMs with FP32 compute.

Reviews (1): Last reviewed commit: "Merge branch 'main' into jberchtold/fix-..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant