mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3267
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/1149
Author: @Vop3p
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v140/hip-fp16-prompt-followup📝 Commits (2)
1868375tests: hip_prefill_gemm runs the FP16-io prompt GEMMs (set_f16_io) on any HIP card, and its BF16 inputs are no longer zerof606dcfhip gfx103x FP16 prompt: STRATA_F16_RANGE counts what enters and leaves FP16; the range measured (outputs peak at 410 of 65504) and the FP32 route compared📊 Changes
9 files changed (+204 additions, -18 deletions)
View changed files
📝
bench/results/2026-10-04-rdna2-fp16-prompt/README.md(+54 -5)📝
docs/AMD_HIP.md(+4 -1)📝
include/strata/hip_compat/cuda_runtime.h(+1 -0)📝
include/strata/prefill/gemm.hpp(+7 -0)📝
include/strata/prefill/kernels.hpp(+5 -0)📝
src/prefill/gemm.cu(+45 -0)📝
src/prefill/kernels.cu(+36 -2)📝
src/prefill/prefill.cpp(+10 -0)📝
tests/hip/prefill_gemm.cpp(+42 -10)📄 Description
Two follow-ups to #835 that were on its branch when
mainwas rewritten, re-filed on 0.1.40.1 with the review changes (opt-inSTRATA_HIP_PROMPT_F16=1, the mode decided once per stage) kept.STRATA_F16_RANGE=1records, per device, the largest |value| and the count beyond 65504 (or not finite) at the three places a value enters or leaves FP16 - the activation images (hf_sat), the BF16 weights converted to FP16 (bf16_to_f16_rows) and the FP16 GEMM outputs as they are widened (widen_rows_f16) - and prints one line per prompt. It sits beside the review'sSTRATA_DBG_NANcount inwiden_rows_f16. Off, the cost is one flag read per value; on, a 34.4K-token prompt read at 889.8 tok/s against 888.5 without it. Measured on one RX 6900 XT over 466K tokens in nine prompts (three corpus slices, two prompts built to push activations - delimiter floods, repeated tokens, base64, mixed scripts - and four batches of real API requests): FP16 GEMM outputs peak at 410 of 65504, nothing beyond the range or non-finite. The numbers are inbench/results/2026-10-04-rdna2-fp16-prompt/README.md, which also gains the same-card comparison against the FP32 SGEMM route of #1006.hip_prefill_gemmruns its shapes a second time withset_f16_io(true)on any HIP card: X as the FP16 image for the BF16 products, a scratch of 64 rows so a 96-row weight converts in two slices,ldy > N, an odd N, T = 1 and abeta = 1f16() call (which keeps the FP32-out GEMM); the FP16-out results are checked at FP16's rounding, the row padding and the guards around Y must be untouched. Its BF16 inputs are no longer all zero.HIP ctest on the RX 6900 XT at 0.1.40.1 (
82f46a8), with this change and #1148 (thehip_prefill_wmma_gemm_parityskip) applied: 19 tests, 13 pass, 6 skip (the WMMA / hipBLASLt / fused-kernel tests that do not apply to gfx1030), 0 fail.Original branch: #835's
hip-gfx103x-fp16-promptafter the merge.Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.