Skip to content

feat(v81): clean-room SM8850 Hexagon v81 HMX FP16 (23.19 TFLOPS), Adreno 840 AHB VLA, and twin receipts - #50

Merged
saariuslystoned merged 1 commit into
mainfrom
feat/sm8850-v81-hmx-ahb-vla
Nov 30, 2026
Merged

saariuslystoned merged 1 commit into
mainfrom
feat/sm8850-v81-hmx-ahb-vla

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

Summary

Adds clean-room Hexagon v81 HMX FP16 support (HAP_power_set_HMX_v2, fixed compute_resource_hmx_unlock(ctx_id), CRM-before-power single-page VTCM, QURT_HVX_MODE_128B=1), the Adreno 840 <-> Hexagon v81 AHardwareBuffer zero-copy VLA benchmark, mirrored freesilicon-twin calibration receipts, and proof/sm8850-v81-hmx/PROOF.md.

Key Verified Hardware Highlights (SM8850, Android 16, uid=2000, SELinux Enforcing=1)

  • Hexagon v81 HMX FP16 (src/freehexagon_v81_hmx_skel.c, src/freehexagon_v81_hmx_fp16.S): 46.302 us UTIMER -> 23.1899 TFLOPS peak (512x1024x1024), 12,701.14 FLOPs/Q6-cycle at 1.824 GHz Q6 clock (reflecting v81 systolic width and/or separate HMX_v2 clock rail), 0 mismatches, 0.0 nmse, hardware ReLU verified (cvt_ctrl=0x0 and 0x2).
  • Adreno 840 <-> v81 HMX AHardwareBuffer Zero-Copy VLA (tools/sm8850_v81_vla_ahb.c, shaders/adreno840/vla_*.comp): Single 16 MiB AHardwareBuffer imported via VK_ANDROID_external_memory_android_hardware_buffer and mapped via fastrpc_mmap + remote_register_buf_attr (SYNC_FD handoff, 0 B host copy, 0 mismatches, nmse <= 6.27e-10). Slashes stem + handoff by 4.81x at M=1024 (1,018.6 us vs 4,896.3 us) and beats CPU-staged by 1.27x p50 / 1.49x p95 at M=256.
  • Mirrored freesilicon-twin Receipts:
    • twin/receipts/sm8850-v81-hmx-calibrated.json (4 points)
    • twin/receipts/sm8850-v81-ahb-vla-calibrated.json (6 points)
    • Byte-identical mirrors under python/freesilicon_twin/data/receipts/.

Verification

  • make clean && make verify (C11/C++17 headers, full unit/mock suite, clean-room audit 0 errors across 157 files)
  • cmake -B build-cmake && cmake --build build-cmake -j && ctest --test-dir build-cmake --output-on-failure (29/29 PASS)
  • Host Clang ASan + UBSan on tests/test_freehexagon_v81_hmx.c and tools/sm8850_v81_vla_ahb.c --mock (0 errors, 0 mismatches)
  • Android NDK r27c aarch64-linux-android34 PIE cross-compile (DT_NEEDED strictly [libdl.so, libm.so, libc.so])
  • proof/sm8850-v81-hmx/PROOF.md

@saariuslystoned
saariuslystoned merged commit 03a205a into main Nov 30, 2026
5 checks passed
@saariuslystoned
saariuslystoned deleted the feat/sm8850-v81-hmx-ahb-vla branch November 30, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant