Skip to content

feat(rocBLAS): enable hipBLASLt backend for F32 GEMM on gfx942 and gfx950 - #13901

Merged
mpanoop merged 1 commit into
ROCm:developfrom
mpanoop:sgemm_backend_mi300x_mi35x
Oct 19, 2026
Merged

mpanoop merged 1 commit into
ROCm:developfrom
mpanoop:sgemm_backend_mi300x_mi35x

Conversation

@mpanoop

@mpanoop mpanoop commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

This PR extends hipBLASLt backend support for F32 (SGEMM) operations on both gfx942 and gfx950 architectures. Previously:

  • gfx950: F32 was explicitly disabled and defaulted to Tensile
  • gfx942: F32 was only enabled on the 228-CU MI300A configuration

This change enables F32 GEMM to leverage the hipBLASLt backend for improved performance on:

  • All gfx950 devices (MI350 series)
  • Both MI300A (228 CU) and MI300X (304 CU) gfx942 devices

This follows the pattern established in #13045, which defaulted various data types to hipBLASLt on specific architectures.

Technical Details

Changes to tensile_host.cpp

The useHipBLASLt() function has been modified:

  1. gfx950 architecture (lines 1295-1301):

    • Before: Early return false for F32 types, forcing Tensile backend
    • After: All types including F32 now use hipBLASLt via prob.handle->tryHipBLASLt()
    • Removed the TODO comment about SGEMM support
  2. gfx942 architecture (lines 1303-1333):

    • Before: F32 was in the only_MI300A category, restricting it to 228 CU devices only
    • After: F32 moved to the MI300A_or_MI300X category alongside fp16, bf16, and fp64
    • This enables F32 on both 228 CU (MI300A) and 304 CU (MI300X) configurations
    • Complex types (complex-fp64, complex-fp32) remain in the only_MI300A category

Changes to CHANGELOG.md

Updated the rocBLAS 5.8.0 changelog to reflect the new defaults:

  • gfx950: Updated from "every input type except real f32_r" to "all input types"
  • gfx942: Added f32_r to the list of types enabled on both MI300A and MI300X

Key Implementation Details

// gfx950: Now enables hipBLASLt for all types including F32
if(arch == 950)
{
    return prob.handle->tryHipBLASLt();
}

// gfx942: F32 now included in MI300A_or_MI300X category
constexpr bool MI300A_or_MI300X = sizeof(Ti) == 2 || std::is_same<Ti, double>::value
                                  || std::is_same<Ti, float>::value;

Impact

Architectures Affected

  • gfx950 (MI350 series): All devices now use hipBLASLt for F32
  • gfx942 (MI300 series):
    • MI300A (228 CU): Already supported, no change
    • MI300X (304 CU): Now enabled for F32 (previously Tensile only)

Backward Compatibility

  • The ROCBLAS_USE_HIPBLASLT environment variable continues to force or disable the hipBLASLt backend, providing an override mechanism

…x950

- Enable hipBLASLt for F32 (SGEMM) on all gfx950 devices
- Enable hipBLASLt for F32 on both MI300A (228 CU) and MI300X (304 CU) gfx942 devices
- Previously F32 was disabled on gfx950 and only enabled on 228 CU gfx942 devices
- Updated CHANGELOG.md to reflect the new default backend behavior

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@therock-pr-bot

therock-pr-bot Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rocblas/library/src/tensile_host.cpp; no test file found
🔎 pre-commit ✅ Pass —
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —
🤖 therock-pr-bot ✅ Pass —

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #13901   +/-   ##
========================================
  Coverage    76.02%   76.02%           
========================================
  Files         2869     2869           
  Lines       475279   475279           
  Branches     71197    71197           
========================================
  Hits        361297   361297           
  Misses       89407    89407           
  Partials     24575    24575           
Flag Coverage Δ *Carryforward flag
TensileLite-CPP 49.30% <ø> (ø) Carriedforward from 6bb613a
TensileLite-Unit 83.57% <ø> (ø) Carriedforward from 6bb613a
hipBLAS 90.62% <ø> (ø) Carriedforward from 6bb613a
hipBLASLt 66.03% <ø> (ø) Carriedforward from 6bb613a
hipCUB 82.68% <ø> (ø) Carriedforward from 6bb613a
hipDNN 87.00% <ø> (ø) Carriedforward from 6bb613a
hipFFT 42.00% <ø> (ø) Carriedforward from 6bb613a
hipRAND 76.12% <ø> (ø) Carriedforward from 6bb613a
hipSOLVER 69.67% <ø> (ø) Carriedforward from 6bb613a
hipSPARSE 86.99% <ø> (ø) Carriedforward from 6bb613a
rocBLAS 68.73% <ø> (ø)
rocFFT 48.10% <ø> (ø) Carriedforward from 6bb613a
rocRAND 57.30% <ø> (ø) Carriedforward from 6bb613a
rocSOLVER 76.74% <ø> (ø) Carriedforward from 6bb613a
rocSPARSE 76.92% <ø> (ø) Carriedforward from 6bb613a
rocThrust 93.15% <ø> (ø) Carriedforward from 6bb613a

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
projects/rocblas/library/src/tensile_host.cpp 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TorreZuk TorreZuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@mpanoop
mpanoop merged commit 79b9ff7 into ROCm:develop Oct 19, 2026
183 of 189 checks passed
@assistant-librarian

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants