Skip to content

Benchmarks - Add experimental MI455X MXFP4 hipBLASLt GEMM - #882

Open
gusui-msft wants to merge 16 commits into
mainfrom
feat/hipblaslt-mxfp4-20261015
Open

gusui-msft wants to merge 16 commits into
mainfrom
feat/hipblaslt-mxfp4-20261015

Conversation

@gusui-msft

@gusui-msft gusui-msft commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Add mxfp4 to the existing ROCm hipblaslt-gemm wrapper for AMD Instinct MI455X (gfx1250). Use in_types: [mxfp4] with the layout and initialization shown below; FP16 remains the default. Existing FP32/FP16/BF16/FP8 commands and metrics are unchanged. No new package, image, production SKU configuration or threshold is introduced.

Use a dedicated benchmark instance with a compatible hipblaslt-bench. The reference client encodes 32-element E8M0 blocks for both inputs as --scaleA 3 --scaleB 3 (B32E8); it does not use separate block row/column switches. The upstream gfx1250 test includes FP4 inputs, FP32 compute and output, TN and maf2_0 initialization.

yaml hipblaslt-gemm: parameters: in_types: [mxfp4] shapes: ["130,128,512", "256,256,2048"] transA: T transB: N initialization: maf2_0

The path requests one solution, GPU-event timing, kernel information and strict CPU verification. It checks the returned shape, dtypes, scale modes, timing/throughput consistency and verification fields before recording metrics. The wrapper additionally requires norm_error < 1e-5; that conservative bound needs hardware calibration. Both mxfp4 and maf2_0 require a dedicated mxfp4 benchmark instance. Preflight validates the requested case, reads the GFX target from visible device 0 once, and checks the scale and initialization values advertised by the client. The verification, GPU-timer and kernel-info switches are passed directly to the client; a nonzero exit produces no metrics for that command. tolerant_fail does not fall back to another precision.

Validation

  • All 15 HIP wrapper tests passed on CPU. Runner checks distinguished malformed client output, internal command-index errors and timeouts, with no metrics recorded for the failed cases. Formatting, lint and changed-module type checks passed. Earlier controls covered 24 legacy precision/value comparisons.
  • In earlier CPU validation, a driver using the reference vendor option parser accepted both generated command lines and rejected a removed block-dimension switch. A simulated device/client exercised the real executor, wrapper and result writer for both shapes, three repetitions each. PR checks.
  • MI455X hardware validation is pending. A reported kernel name or simulated CSV is not proof of native execution, numerical tolerance, or repeatable performance. No production baseline is claimed.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 04:40

Copilot AI 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.

🔵 Needs a closer look

Client flag syntax needs correction, and end-to-end GPU/client behavior remains unvalidated.

1 open finding
What changed in this PR

Adds experimental, opt-in MXFP4 support to the existing ROCm hipBLASLt GEMM benchmark without changing legacy defaults.

Changes:

  • Adds device, client capability, argument, and result validation.
  • Adds synthetic tests for MXFP4 commands and failure handling.
  • Documents requirements, metrics, and pending hardware qualification.
File Description
tests/​benchmarks/​micro_benchmarks/​test_hipblaslt_function.py Adds synthetic MXFP4 and invalid-throughput tests.
superbench/​benchmarks/​micro_benchmarks/​hipblaslt_function.py Adds gated MXFP4 execution and validated metrics.
docs/​user-tutorial/​benchmarks/​micro-benchmarks.md Documents experimental usage and validation limits.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.71%. Comparing base (f91ecbc) to head (b01008a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #882      +/-   ##
==========================================
+ Coverage   86.58%   86.71%   +0.12%     
==========================================
  Files         107      107              
  Lines        8419     8486      +67     
==========================================
+ Hits         7290     7359      +69     
+ Misses       1129     1127       -2     
Flag Coverage Δ
cpu-python3.10-unit-test 72.08% <100.00%> (+0.24%) ⬆️
cpu-python3.12-unit-test 72.08% <100.00%> (+0.24%) ⬆️
cpu-python3.7-unit-test 71.55% <100.00%> (+0.25%) ⬆️
cuda-unit-test 84.78% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:42

Copilot AI 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.

🔵 Needs a closer look

Native execution, verification tolerances, and actual client output remain hardware-unvalidated and require human review.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@gusui-msft
gusui-msft marked this pull request as ready for review November 23, 2026 21:13
@gusui-msft
gusui-msft requested a review from a team as a code owner November 23, 2026 21:13
Copilot AI balanced review requested due to automatic review settings November 23, 2026 22:29

Copilot AI 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.

🔵 Needs a closer look

The MXFP4 path has only synthetic coverage, requiring human merge judgment while native gfx950/RocRoller execution, packing and scales, correctness tolerances, and kernel timing remain unvalidated.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 23, 2026 23:59

Copilot AI 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.

🟡 Changes recommended

Throughput validation only covers MXFP4, leaving FP32, FP16, BF16, and FP8 able to report success and record non-finite or non-positive TFLOPS.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 00:09

Copilot AI 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.

🔵 Needs a closer look

Human review is needed because the experimental gfx950/ROCm MXFP4 path has only synthetic coverage, leaving vendor packing/scales, verification tolerance, and GPU-event timing unvalidated on hardware.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:01

Copilot AI 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.

🔵 Needs a closer look

Human review is needed to judge whether the experimental opt-in gate is sufficient given synthetic-only coverage and missing native gfx950 validation of MXFP4 packing, correctness, and verification thresholds.

1 open issue

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:31

Copilot AI 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.

🔵 Needs a closer look

Native gfx950 validation remains pending, so human hardware review is needed to confirm MXFP4 kernel execution, decoded-input verification, the 1e-5 tolerance, and exclusion of setup and verification from measured latency.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 21:51

Copilot AI 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.

🔵 Needs a closer look

Native gfx950 validation is still needed because synthetic tests cannot confirm MXFP4 kernel execution, appropriate verification tolerances, or representative GPU-event timing.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 24, 2026 23:25
@gusui-msft gusui-msft changed the title Benchmarks - Add experimental MXFP4 hipBLASLt GEMM Benchmarks - Add experimental MI455X MXFP4 hipBLASLt GEMM Nov 24, 2026

Copilot AI 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.

🔵 Needs a closer look

Pending MI455X/gfx1250 hardware validation leaves native MXFP4 execution, the suitability of the norm_error < 1e-5 bound, and repeatable GPU-event performance unverified by synthetic CPU tests.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 25, 2026 17:54

Copilot AI 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.

🔵 Needs a closer look

Target MI455X/gfx1250 hardware qualification remains pending for native MXFP4 execution, the norm_error < 1e-5 bound, and repeatable GPU-event timing with a compatible hipBLASLt client.

No open issues 🎉

Review effort: Balanced

gusui-msft and others added 15 commits November 30, 2026 10:26
Add an opt-in gfx950 MXFP4 path using the ROCm 7.2.4 client contract: E2M1 inputs, 32-element E8M0 blocks, FP32 output, and mandatory CPU verification. Preserve legacy commands and metrics while rejecting invalid throughput and validating the new result contract.\n\nAdd capability, command, parser, failure, and regression coverage. Native client builds, GPU correctness, kernel evidence, and performance baselines remain pending; no production configuration is enabled.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pass verify, GPU timing and kernel-info options as standalone boolean switches to the pinned hipBLASLt client. Add a token-contract regression that catches value-consuming syntax independently of the expected command string.

Apply the repository-pinned YAPF formatting to both changed Python files. Validate the complete generated argv with the original vendor option parser on CPU and keep native GPU qualification pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require the reported alpha and beta to equal the requested values. Compare their decimal values exactly so alternate printed forms are valid but a different operation cannot produce correctness or performance metrics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Record experimental metrics only after validating the MXFP4 case. Preserve existing throughput behavior for other precisions, accept equivalent capability text and diagnostic footers, and shorten the tutorial and table-driven regression cases.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate recognition of a unique result row from metric validation and apply the same finite-positive rule to device throughput and latency. This keeps the parser within the existing complexity limit without changing the legacy path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain full client help only on failure or explicit raw logging. Exercise the results parser without probing a device or client, and use distinct M/N/K dimensions so a swapped output cannot pass. Keep the MXFP4 metrics in the existing GEMM table.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep existing precision arguments, parser formatting and test helpers intact. Restore the public tutorial and leave the example, deployment scope and hardware qualification notes in the PR description instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Selecting mxfp4 already opts in to the experimental path. Drop the duplicate boolean option while retaining the default FP16 input, architecture, client and verification checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the gfx1250 hipBLASLt client contract rather than obsolete block-dimension options. Check B32E8 on both operands, support the MAF2 input pattern, require strict CPU verification and kernel identification, and retain the default and legacy precision behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consolidate command checks and keep the subprocess failure case that can otherwise record misleading metrics from a valid result row.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Check the advertised scale and initialization values. Let the client reject unsupported ordinary switches during execution, where a nonzero exit already suppresses metrics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return argument diagnostics directly and query the visible GPU architecture once. Only classify missing fields or invalid scalar text and case values as client output errors; leave wrapper bookkeeping failures to the benchmark runner.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use strict verification without the redundant verify flag, and name the row parser and test benchmark factory for what they return.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reject mixed --in_types whenever mxfp4 or maf2_0 is requested, not only with maf2_0 initialization, so mixed lists with hpl or trig_float fail argument validation instead of aborting device preflight across legacy datatypes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gusui-msft
gusui-msft force-pushed the feat/hipblaslt-mxfp4-20261015 branch from e5bc5ed to 56a45be Compare November 30, 2026 17:39
Copilot AI balanced review requested due to automatic review settings November 30, 2026 17:39

Copilot AI 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.

🔵 Needs a closer look

MI455X/gfx1250 hardware qualification is still needed to confirm native MXFP4 execution, calibrate the numerical-error bound, and validate client compatibility and repeatable GPU-event timing.

No open issues 🎉

Review effort: Balanced

@gusui-msft
gusui-msft marked this pull request as draft November 30, 2026 19:29
Count result headers directly instead of guessing trailing CSV rows, and stop re-parsing hardcoded CLI constants with Decimal while preserving case, kernel, timing and verification guards.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 30, 2026 20:03

Copilot AI 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.

🟡 Changes recommended

MXFP4 rows with missing or incorrect alpha/beta coefficients are accepted and marked correct, allowing published metrics to represent a different GEMM operation than requested.

1 open issue

Review effort: Balanced

@polarG
Hongtao Zhang (polarG) marked this pull request as ready for review November 30, 2026 21:07

This branch has not been deployed

No deployments
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.

2 participants