flashrt/fp4-fused-ops
0470
1# Validation2 3Local source validation on NVIDIA GeForce RTX 5090:4 5```bash6python fp4-fused-ops/tests/test_fp4_fused_ops.py \7 --backend source \8 --mode full \9 --json-out internal-tests/fp4-fused-ops-source-full.json10```11 12Result:13 14- The current full source gate passed.15- Unsupported dimensions are rejected explicitly.16- Residual in-place updates are checked against the FP16 math contract.17- FP4/SFA outputs are dequantized and checked against the documented NVFP418 quantization envelope.19- Linear NVFP4 pack/scale bytes use a bit-level reference.20- NCDHW RMSNorm, RMSNorm-SiLU and causal-cache outputs are checked against21 PyTorch and raw native launchers; fullgraph compile parity is covered.22- RTX 5090 SM120 full gate: `46/46` checks passed.23- Jetson AGX Thor SM110 model-shape gate: `58/58` checks passed across PI0.5,24 GROOT, Cosmos Edge, and LingBot VLA rows.25- The 2026-08-06 Thor rerun includes the additive E0M3 AdaRMS, gated-residual26 AdaRMS, and GELU-multiply producers plus the Cosmos Edge residual-RMS and27 ReLU-squared NVFP4 producers. E0M3 packed/SFA outputs were deterministic,28 residual updates and gates were exact, and all CUDA Graph checks passed.29- BF16 AdaRMS and gated-residual AdaRMS twins are checked at rows30 `1/10/51/105`, `dim=1024`. Tests require exact BF16 residual/gate values,31 the documented NVFP4 dequantization envelope, and bit-identical CUDA Graph32 replay for the production rows=10 case.33 34Representative correctness envelope from the full run:35 36| Workload | Shape | Max abs | Mean abs | P99 abs | Cosine |37| --- | ---: | ---: | ---: | ---: | ---: |38| residual+rms+FP4 v2 vs math reference | rows=1, dim=1024 | 0.453125 | 0.069949 | 0.306641 | 0.995567 |39| residual+rms+FP4 v2 vs math reference | rows=10, dim=2048 | 0.552734 | 0.071892 | 0.300781 | 0.995432 |40| residual+rms+FP4 v2 vs math reference | rows=64, dim=2048 | 0.589844 | 0.071508 | 0.303993 | 0.995464 |41| residual+rms+FP4 v2 vs math reference | rows=128, dim=4096 | 0.562500 | 0.071550 | 0.303711 | 0.995468 |42| silu-mul FP4 v2 vs v1 dequant | rows=10, dim=2048 | 0.023438 | 0.000022 | 0.000000 | 0.999895 |43| silu-mul FP4 v2 vs v1 dequant | rows=128, dim=4096 | 0.054688 | 0.000014 | 0.000000 | 0.999937 |44 45Notes:46 47- The residual/RMS rows compare a dequantized FP4 result to the FP16 math48 reference, so the nonzero error is expected NVFP4 quantization error.49- `packed_equal=False` can appear for v2-vs-v1 checks when the dequantized50 values are equivalent within the FP4 envelope; public validation is based on51 dequantized values plus residual contract, not byte identity alone.52## HF Jobs Publish Status53 54`flashrt/fp4-fused-ops` v1 was built and uploaded through the repository HF55Jobs workflow.56 57- Hub revision checked on June 20, 2026: `c77ac5a1`58- Uploaded variants:59 - `torch211-cxx11-cu128-x86_64-linux`60 - `torch211-cxx11-cu130-x86_64-linux`61 - `torch212-cxx11-cu130-x86_64-linux`62 - `torch212-cxx11-cu132-x86_64-linux`63 64The SM110 `torch211-cxx11-cu130-aarch64-linux` artifact and cold Hub load are65required release gates before claiming published Thor support.66 67## Thor Native Parity68 69The package compile flags match the native FlashRT target, including70`--use_fast_math`. Without that flag, gated producers regress materially even71though correctness passes. With the release flags, CUDA Graph wrapper/native72latency over 30 production-model rows had median `1.001`, p95 `1.052`, and73maximum `1.082` on Thor.74 