Skip to content

Android: opt-in causal NPU/GPU execution with generic QNN discovery - #16

Draft
joe-sama wants to merge 35 commits into
zoompilot:mainfrom
joe-sama:android-causal-parallel
Draft

joe-sama wants to merge 35 commits into
zoompilot:mainfrom
joe-sama:android-causal-parallel

Conversation

@joe-sama

@joe-sama joe-sama commented Oct 19, 2026 •

Copy link
Copy Markdown

Cinque Terre V3 can compute historical attention independently of the current image. This adds an opt-in path that runs HTP vision and GPU history concurrently, then HTP current-token decoding and CPU output/state assembly. Original weights, precision and same-frame feedback are preserved.

QNN discovery is generic rather than Xiaomi/SM8750-pinned. The route uses strict HTP placement, real shared allocations, dependency/error barriers and validated model/part hashes. Unsupported models select whole-NPU execution before preparation, and the UI reports the actual route. Compatibility still requires device accuracy and sustained-performance checks. The shared QNN foundation is also isolated in #19; merge that first, then rebase this PR to remove the overlap.

The diff now contains 41 source/test/doc files (+2,174/−55). Research telemetry and device-pinned adapter settings were removed; historical evidence remains linked at its original commit. No SDK binaries, model weights or APKs are committed.

Validation: 42 focused Swift tests, 59 Android unit tests in each default/opt-in build, both release APK builds, Android native compilation, and adapter forwarding/failure/lifetime tests passed. All four generated graphs and the manifest reproduce the phone-tested bundle byte-for-byte. All 41 published blobs and the complete tree match the tested source. An expanded WSL run had eight large-UDP frame-assembly issues in unchanged code; those remain outside this patch.

The earlier Xiaomi 15 prototype measured 27.2 ms mean / 29.5 ms P99 over 12,001 frames (10 minutes), with zero frames above 50 ms; unchanged original-reference gates passed 128 frames before and after. These are historical prototype results: this exact portable APK has not been phone-qualified, other Snapdragon devices are unqualified, and provider-call overlap does not measure physical NPU occupancy. Kept as a draft pending device qualification.

Build options and reproduction. Related: #17, #19.

@zephleggett

Copy link
Copy Markdown
Collaborator

hey thanks for this, seems like a good idea! I can review and merge when you are ready @joe-sama

@joe-sama joe-sama changed the title Android: add opt-in SM8750 causal-prefill execution across HTP and GPU Android: opt-in causal NPU/GPU execution with generic QNN discovery Oct 24, 2026
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.

2 participants