mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #343] [CLOSED] Don't pursue: BF16 decode GEMV via Turing tensor cores (sm_75) - measured negative #2587
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2587
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/343
Author: @hireymage
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:tc-gemv-sm75-bench📝 Commits (1)
8c851bdbench: BF16 GEMV via Turing tensor cores on sm_75 - measured negative📊 Changes
2 files changed (+362 additions, -0 deletions)
View changed files
➕
bench/results/2026-09-30-tc-gemv-sm75/README.md(+57 -0)➕
bench/results/2026-09-30-tc-gemv-sm75/bench_tc_gemv.cu(+305 -0)📄 Description
Don't pursue: BF16 decode GEMV via Turing tensor cores (sm_75) — measured negative
Question: the QSA prompt attention rides the Turing tensor cores (#270-style
mma.sync.m16n8k8); can the decode GEMVs (bf16_gemv.cu) do the same?This PR adds an isolated benchmark comparing the production warp kernel against the tensor-core path on the real decode shapes (n_in = 2560, BF16 weights), with three TC variants covering the conversion cost from every angle (W preconverted once / in-register / fused no-reduce form) and a full k-split occupancy sweep for the TC side. No inference-path changes.
Result: the TC variant loses on every real shape, 1.3–2.2×, even at its best config — after conversion overhead:
Parity passes (max err vs fp64 ref at fp16-accumulation level, 1.7e-6–7.2e-6; BF16→FP16 conversion exact, 0/2,000,000). The warp kernel is already bandwidth-bound at 374 GB/s; the TC path reaches only ~169 GB/s and a single-token GEMV throws away 15/16 of the m16 MMA tile.
Measured on i7-8700K + RTX 2070 8 GB (sm_75, 36 SMs), engine 0.1.27 tree (
bf16_gemv.cuunchanged through 0.1.30), qwen3.8-flash-next ~125.7B MoE Q2_0 in production. Conclusions: keep the warp kernel; the benchmark is checked in so nobody has to measure this twice and can rerun it on future hardware (native bf16, denser GEMV batching). Details and rerun instructions inbench/results/2026-09-30-tc-gemv-sm75/README.md.Limit: latency from back-to-back CUDA-event timing (no ncu profile); production engine ran concurrently on the same GPU.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.