Skip to content

openrknn: FP16 polish — auto-detect, output detiling, CI cleanup - #94

Merged
widgetii merged 1 commit into
masterfrom
openrknn/fp16-polish
Apr 13, 2026
Merged

widgetii merged 1 commit into
masterfrom
openrknn/fp16-polish

Conversation

@widgetii

Copy link
Copy Markdown
Owner

Summary

All 4 polish items from #80:

  1. Auto-detect FP16 transformer models: checks for exNorm/exSDPAttention ops + FP16 input. Automatically enables unified activation BO and 3× sizing. No more ORKNN_ACT_SIZE_MULT env var needed.

  2. Output detiling: FP16 3D tensors (e.g., [1,1024,768]) are stored in [H/8, C, 8] tiled format. rknn_outputs_get now detiles to NHWC automatically, both for raw FP16 and want_float FP32 paths.

  3. CI cleanup: removed smolvlm_l0_mlp from DIFF_ALLOWLIST (it's BYTE-EXACT). Removed ORKNN_ACT_SIZE_MULT env overrides from ground_truth.json.

  4. l0_attn investigation: DMA-class diffs = 0, but 22513 non-DMA diffs from weight BO size mismatch (10MB openrknn vs 37MB vendor). Needs model parser work — kept on allowlist.

Test plan

  • CI: 9/9 pass, 6/7 byte-exact, 0 gating
  • l0_mlp BYTE-EXACT without env var (auto-detect works)
  • Cross-compile clean

🤖 Generated with Claude Code

1. Auto-detect FP16 transformer models (exNorm/exSDPAttention ops with
   FP16 input) and enable unified activation BO + 3x sizing automatically.
   Removes the ORKNN_ACT_SIZE_MULT env var requirement.

2. Output detiling for FP16 3D tensors: the NPU stores output in
   [H/8, C, 8] tiled format. rknn_outputs_get now detiles to NHWC
   [H, C] automatically for 3D FP16 tensors, both for raw FP16
   output and want_float=1 FP32 conversion.

3. CI cleanup: remove smolvlm_l0_mlp from DIFF_ALLOWLIST (it's now
   BYTE-EXACT). Remove ORKNN_ACT_SIZE_MULT env overrides from
   ground_truth.json.

4. l0_attn_fused: DMA-class diffs are 0, but has 22513 non-DMA diffs
   from weight BO size mismatch (10MB vs vendor 37MB). Needs model
   parser work — kept on allowlist.

CI: 9/9 pass, 6/7 byte-exact, 0 gating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii
widgetii merged commit 19b1005 into master Apr 13, 2026
7 checks passed
@widgetii
widgetii deleted the openrknn/fp16-polish branch April 13, 2026 11:44
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