openrknn: FP16 polish — auto-detect, output detiling, CI cleanup - #94
Merged
Merged
Conversation
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>
This was referenced Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All 4 polish items from #80:
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_MULTenv var needed.Output detiling: FP16 3D tensors (e.g., [1,1024,768]) are stored in
[H/8, C, 8]tiled format.rknn_outputs_getnow detiles to NHWC automatically, both for raw FP16 and want_float FP32 paths.CI cleanup: removed
smolvlm_l0_mlpfrom DIFF_ALLOWLIST (it's BYTE-EXACT). RemovedORKNN_ACT_SIZE_MULTenv overrides from ground_truth.json.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
🤖 Generated with Claude Code