mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5299] [Engine] Enable generic NVFP4 W4A8 prefill and parity tools on HIP #5375
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#5375
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/5299
Author: @Tsury
Created: 11/5/2026
Status: 🔄 Open
Base:
main← Head:hip-nvfp4-parity📝 Commits (4)
0f07ce3test: expose NVFP4 parity tools on HIP7c64648feat: enable NVFP4 W4A8 prefill on HIP464a1c7docs: record HIP NVFP4 parity and manual build support652904bfix: keep HIP NVFP4 W4A8 explicitly opt-in📊 Changes
3 files changed (+39 additions, -12 deletions)
View changed files
📝
CMakeLists.txt(+9 -3)📝
docs/NVFP4.md(+22 -5)📝
src/prefill/moe_mmq.cu(+8 -4)📄 Description
HIP builds already instantiate the native NVFP4 decode kernels, but the prompt path compiles out NVFP4 MMQ support. Compile the existing generic W4A8 unit for HIP and route NVFP4 products to it only with explicit
STRATA_PREFILL_NVFP4=w4a8. HIP keeps its FP16 default. W4A4 stays CUDA-only.The change also exposes the existing NVFP4 GPU parity/bandwidth executables on HIP and adds the prompt parity executable to its build. The numerical kernels and pack format are unchanged. Setup continues to offer NVFP4 packs on NVIDIA only; the documented HIP route uses an existing pack manually.
Passed
The executions below used engine commit
7c6464855a83142607f05555b9eebf23896fb922, before the later opt-in-only host gate. The numerical kernels and explicit-W4A8 active path are unchanged in the latest head.Strix Halo gfx1151, ROCm 7.14.1, AMD clang 23, v0.2.10 base
ffa80d73133ea5c548aefe57889a16e8085a938f, pinned GGML3cf03257f219afbe7334045ff7c6a06ac68c627d:strata,nvfp4_expert_gpu_parity,mmq_nvfp4_parity,nvfp4_decode_bench,nvfp4_avx512_parity, andnative_arithmetic_paritywith HIP gfx1151, portable CPU baseline, MMQ and tests enabled.nvfp4_expert_gpu_parity pack/experts.bin: all six default experts passed; worst relative output error against FP64 1.165% (the two activation quantizations remain).STRATA_PREFILL_NVFP4=w4a8 mmq_nvfp4_parity pack/experts.bin: all default gate/up and down products passed at 1/7/37/128/300 rows, relative error 0.5243–0.5569%.--group: all three grouped products passed, relative error 0.5361–0.5374%.The public pack used was OrcaRouter NVFP4 GPTQ, revision
2692e6abba95729fd60094099a773a20b9fca228; all files matched its SHA256SUMS. Decode parity and prompt parity use their existing independent FP64 references. These results establish numerical checks on gfx1151, not model quality or other HIP architectures.Failed
None in the numerical checks above.
Not run / targeted help
This PR is a draft under CONTRIBUTING.md until the current head is built on every affected backend. The current-head HIP build passed (
strata,mmq_nvfp4_parity). A CPU-only host-gate probe withHIP_VISIBLE_DEVICES=-1returned supported=0 with the variable unset orfp16, supported=1 with explicitw4a8, and supported=0 withw4a4. CUDA compilation and execution are not available in this environment. SYCL uses its separate CMake project and does not compile these sources.Targeted help requested: build the current head with
STRATA_ENABLE_CUDA=ON, a supported CUDA architecture and the pinned GGML source, includingstrata,nvfp4_expert_gpu_parity, andmmq_nvfp4_parity. Please report compiler/version/architecture and the result here. CUDA compatibility is not claimed without that check.Default and limits
HIP W4A8 is explicit opt-in; an unset
STRATA_PREFILL_NVFP4retains the existing FP16 fallback. Source inspection establishes that guard; a before/after default-path byte comparison remains pending. The installer choices are unchanged. No performance gain or model-quality equivalence is claimed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.