Repository navigation
Add boltnn_executorch_llm_runner: run weight-shared QNN LLM exports from the AP - #24456
Conversation
… from the AP
Summary:
QNN running inside the CDSP user PD cannot load weight-shared context binaries ("Shared weights buffer isn't supported on this platform", err 1000), so BoltNN's `executorch_app` (QNN inside the Bolt DSP skel) cannot run a hybrid LLM export whose `prefill_forward` and `kv_forward` share one weight-shared context. QNN running from the CPU side (AP `libQnnHtp.so` + `libQnnHtpV79Stub.so`, graph construction and execution kicked from the AP) handles them fine.
`//arvr/projects/bolt/bolt/nn/apps:boltnn_executorch_llm_runner` is the upstream `qnn_llama_runner` CLI linked against the upstream QNN ExecuTorch runtime, so `QnnBackend` delegates build and run their graphs from the AP. It takes the same flags as the upstream runner.
To share the CLI, `oss_scripts/llama` gains `qnn_llama_runner_main`: `qnn_llama_runner.cpp` with its entry point renamed to `qnn_llama_runner_main`, on `:runner_lib`. `qnn_llama_runner` and `runner_lib` are unchanged; the `fbcode/` and `xplat/` copies stay byte-identical.
Authored with Claude.
Differential Revision: D129133307
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24456
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 Pending, 1 Unrelated Failure, 2 Unclassified FailuresAs of commit 6119f4a with merge base e40e64c ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@billmguo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129133307. |
This PR needs a
|
Summary:
QNN running inside the CDSP user PD cannot load weight-shared context binaries ("Shared weights buffer isn't supported on this platform", err 1000), so BoltNN's
executorch_app(QNN inside the Bolt DSP skel) cannot run a hybrid LLM export whoseprefill_forwardandkv_forwardshare one weight-shared context. QNN running from the CPU side (APlibQnnHtp.so+libQnnHtpV79Stub.so, graph construction and execution kicked from the AP) handles them fine.//arvr/projects/bolt/bolt/nn/apps:boltnn_executorch_llm_runneris the upstreamqnn_llama_runnerCLI linked against the upstream QNN ExecuTorch runtime, soQnnBackenddelegates build and run their graphs from the AP. It takes the same flags as the upstream runner.To share the CLI,
oss_scripts/llamagainsqnn_llama_runner_main:qnn_llama_runner.cppwith its entry point renamed toqnn_llama_runner_main, on:runner_lib.qnn_llama_runnerandrunner_libare unchanged; thefbcode/andxplat/copies stay byte-identical.Authored with Claude.
Differential Revision: D129133307