[PR #60] [MERGED] bench: add an fp8/e4m3 issue-rate mode to mma_bench #104

Closed
opened 2026-10-31 06:56:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JustAResearcher/gpu-unlock-ada/pull/60
Author: @A-XIANGQAQ
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @JustAResearcher

Base: main ← Head: bench/fp8-issue-rate


📝 Commits (1)

  • 5c368b0 bench: add an fp8/e4m3 issue-rate mode to mma_bench

📊 Changes

2 files changed (+59 additions, -0 deletions)

View changed files

📝 diagnostics/bench/README.md (+10 -0)
📝 diagnostics/bench/mma_bench.cu (+49 -0)

📄 Description

The FP8 sentence in the 2705 section ("other FP8 kernels remain untested") exists because this
repository has no FP8 probe. The only FP8 measurement here is a 4096³ CUTLASS GEMM that reaches about
17% of the card's FP8 peak, so it cannot resolve an issue-rate change in either direction.

This adds the missing probe instead of arguing about the wording:

  • fp8/e4m3 drives mma.sync.aligned.m16n8k32.row.col.f32.e4m3.e4m3.f32 from registers, same harness
    as the other shapes (1056 blocks × 8 warps × 8 accumulator chains).
  • FLOPs per instruction are 16·8·32·2 = 8192, identical to the 16x16x16 shapes, so the printed TF/s
    is directly comparable with f16/f32 — no conversion, no separate scale.
  • All inputs are 1.0 in e4m3 (0x38), so every accumulator must land on k = 32; the value is kept alive
    the same way the other modes do it, so the loop cannot be optimised away.
  • Compiled out below compute capability 8.9.
  • diagnostics/bench/README.md documents the mode, the comparability, and the caveat that this is an
    issue rate while an application GEMM is bounded by the power limit.

Numbers from two cards, for the PR description only (not committed as data):

Card Probe Result
modified 48 GB RTX 4090, unlocked this mode 601.7 – 603.1 TF/s = 91% of the 660.6 TF/s nominal rate, 1.82× the same-session f16/f32
Windows RTX 4070 Ti SUPER, matched pair same m16n8k32 e4m3 probe 165.45 → 323.95 TF/s (1.96×)

Build and check (Linux, CUDA 13.2, sm_89):

nvcc -O3 -arch=sm_89 -std=c++17 -o build/matched-bench/mma_bench diagnostics/bench/mma_bench.cu
build/matched-bench/mma_bench 20000 5

Output on the 4090 (2000 iterations, 1 repetition, for speed):

mode       best TF/s   all runs
f16/f16        302.1 302.1
f16/f32        302.4 302.4
bf16/f32       302.1 302.1
s8/s32         604.0 604.0
fp8/e4m3       601.7 601.7
dp4a           149.9 149.9
ffma            59.0 59.0

Scope: a new measurement mode plus its documentation. No module, firmware, payload or existing mode is
changed; the other five rows above reproduce their previous values.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JustAResearcher/gpu-unlock-ada/pull/60 **Author:** [@A-XIANGQAQ](https://github.com/A-XIANGQAQ) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@JustAResearcher](https://github.com/JustAResearcher) **Base:** `main` ← **Head:** `bench/fp8-issue-rate` --- ### 📝 Commits (1) - [`5c368b0`](https://github.com/JustAResearcher/gpu-unlock-ada/commit/5c368b0371026c671fd73dbd242680aadc7deff2) bench: add an fp8/e4m3 issue-rate mode to mma_bench ### 📊 Changes **2 files changed** (+59 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `diagnostics/bench/README.md` (+10 -0) 📝 `diagnostics/bench/mma_bench.cu` (+49 -0) </details> ### 📄 Description The FP8 sentence in the 2705 section ("other FP8 kernels remain untested") exists because this repository has no FP8 probe. The only FP8 measurement here is a 4096³ CUTLASS GEMM that reaches about 17% of the card's FP8 peak, so it cannot resolve an issue-rate change in either direction. This adds the missing probe instead of arguing about the wording: * `fp8/e4m3` drives `mma.sync.aligned.m16n8k32.row.col.f32.e4m3.e4m3.f32` from registers, same harness as the other shapes (1056 blocks × 8 warps × 8 accumulator chains). * FLOPs per instruction are 16·8·32·2 = **8192**, identical to the 16x16x16 shapes, so the printed TF/s is directly comparable with `f16/f32` — no conversion, no separate scale. * All inputs are 1.0 in e4m3 (`0x38`), so every accumulator must land on k = 32; the value is kept alive the same way the other modes do it, so the loop cannot be optimised away. * Compiled out below compute capability 8.9. * `diagnostics/bench/README.md` documents the mode, the comparability, and the caveat that this is an issue rate while an application GEMM is bounded by the power limit. Numbers from two cards, for the PR description only (not committed as data): | Card | Probe | Result | |---|---|---| | modified 48 GB RTX 4090, unlocked | this mode | 601.7 – 603.1 TF/s = 91% of the 660.6 TF/s nominal rate, 1.82× the same-session f16/f32 | | Windows RTX 4070 Ti SUPER, matched pair | same `m16n8k32` e4m3 probe | 165.45 → 323.95 TF/s (1.96×) | Build and check (Linux, CUDA 13.2, sm_89): ```sh nvcc -O3 -arch=sm_89 -std=c++17 -o build/matched-bench/mma_bench diagnostics/bench/mma_bench.cu build/matched-bench/mma_bench 20000 5 ``` Output on the 4090 (2000 iterations, 1 repetition, for speed): ``` mode best TF/s all runs f16/f16 302.1 302.1 f16/f32 302.4 302.4 bf16/f32 302.1 302.1 s8/s32 604.0 604.0 fp8/e4m3 601.7 601.7 dp4a 149.9 149.9 ffma 59.0 59.0 ``` Scope: a new measurement mode plus its documentation. No module, firmware, payload or existing mode is changed; the other five rows above reproduce their previous values. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 06:56:25 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JustAResearcher/gpu-unlock-ada#104
No description provided.