Uh oh!
There was an error while loading. Please reload this page.
Qualcomm AI Engine Direct - Refactor llama runner for dynamic IO dtypes - #19146
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19146
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a |
b06f047 to
66fafc5Comparechenweng-quic
commented
Apr 28, 2026
Hi @abhinaykukkadapu, It will cause following error in op_fallback.cpp To fix the dtype issue, I add logic in spec_prop_pass to avoid restoring. |
Hi @abhinaykukkadapu, |
abhinaykukkadapu
commented
Apr 29, 2026
@claude review this PR |
Claude finished @abhinaykukkadapu's task in 3m 50s —— View job PR Review: Qualcomm AI Engine Direct - Refactor llama runner for dynamic IO dtypes
Overall AssessmentThis is a well-motivated refactor that removes compile-time dtype dispatch ( The PR is large (33 files, ~800 additions / ~700 deletions) but most changes are mechanical: removing template parameters, switching from typed pointers to Issues Found1. Bug: |
13fbb40 to
8222b4bComparechenweng-quic
commented
May 18, 2026
Hi @psiddh, |
psiddh
commented
May 20, 2026
@claude Re-review the PR thoroughly |
Claude finished @psiddh's task in 2m 41s —— View job Re-review: Qualcomm AI Engine Direct - Refactor llama runner for dynamic IO dtypes
Overall AssessmentThis is a well-executed refactoring that removes compile-time dtype dispatch (template The changes are primarily mechanical — removing template parameters, switching from typed pointers to Compared to the previous review, Issue #6 (kv_cache dtype detection ordering bug) has been fixed — the size check now occurs before the dtype consistency check (lines 80-90 in Issues Found1. Missing |
Looks like this PR has some conflicts., Please take a look at CI failures , one of them seem related to this PR. |
91f76ef to
5c005c3Comparechenweng-quic
commented
May 22, 2026
Hi @psiddh, |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| from typing import Optional | ||
| # register llama.fallback | ||
| import executorch.extension.llm.custom_ops.op_fallback # noqa: F401 |
There was a problem hiding this comment.
Not sure about this import..
a core pass that everyone imports now has a hard dependency on an LLM-specific extension package.
There was a problem hiding this comment.
Or maybe like this
try:
import executorch.extension.llm.custom_ops.op_fallback # noqa: F401
except ImportError:
pass
psiddh
commented
May 22, 2026
lgtm, accepting to unblock |
|
- Summary To enable GPU backend support in the Llama runner, refactoring is required because the dtypes of kv_cache, attention_mask, and logits are currently hardcoded, preventing floating point models from running. This PR fix the issue by removing the hardcoded dtype in the runner.
5664ba1 to
32b5ab5CompareUh oh!
There was an error while loading. Please reload this page.
Summary: Remove debug `print` and `exit(0)` statements accidentally left in `TestExampleLLMScript.test_llama_stories_110m` that cause the test to exit before executing any assertions. These lines were introduced in commit 508cbf07be38 (PR #19146) and prevent the `test-static-llama-qnn-linux (stories_110m)` CI job from running actual model validation, blocking viable/strict progression. Differential Revision: D106533426

Summary
To enable GPU backend support in the Llama runner, refactoring is required because the dtypes of kv_cache, attention_mask, and logits are currently hardcoded, preventing floating‑point models from running.
This PR focuses on removing the hardcode dtype for them.
Key changes
MultimodalPromptProcessor, and related runner classes
construction time instead of compile-time bitwidth detection
offsets; add fill_mask() helper for multi-dtype attention mask filling
Test plan
cc @cccclai@cbilgin@abhinaykukkadapu