Skip to content

openrknn: zero-initialize activation BO - #90

Merged
widgetii merged 1 commit into
masterfrom
openrknn/act-zero-init
Apr 13, 2026
Merged

widgetii merged 1 commit into
masterfrom
openrknn/act-zero-init

Conversation

@widgetii

Copy link
Copy Markdown
Owner

Summary

Zero-initialize the activation BO after allocation. Without this, stale DMA data causes non-deterministic NPU output across different init sessions.

Verified: consecutive runs now produce identical output (cosine=1.0 between runs). Previously run0 vs run2 had only cos=0.87.

Test plan

  • Self-reproducibility: 3 consecutive runs produce identical output
  • CI: pending

🤖 Generated with Claude Code

The activation BO may contain stale data from previous DMA allocations.
Without zeroing, the NPU reads garbage from activation offsets before
any task writes to them (e.g., scratch tensor), causing non-deterministic
output across different init sessions.

Verified: consecutive runs now produce identical output (cosine=1.0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii
widgetii merged commit 9054b7a into master Apr 13, 2026
7 checks passed
@widgetii
widgetii deleted the openrknn/act-zero-init branch April 13, 2026 06:18
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