Uh oh!
There was an error while loading. Please reload this page.
Qualcomm AI Engine Direct - [GenAI Pipeline] PR6: Compilation & inference strategy implementations - #22284
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22284
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 5 PendingAs of commit df39537 with merge base 7f4b8ad ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
qti-horodnic
commented
Aug 28, 2026
@pytorchbot label "release notes: qualcomm" |
psiddh
commented
Aug 28, 2026
@claude review this PR |
Claude finished @psiddh's task in 2m 5s —— View job PR Review: Compilation & Inference Strategy Implementations
Overall this is a clean, well-structured PR. The adapter/strategy separation is consistent with PR5, validation is thorough, error wrapping is correct ( 1. Auto-wired pipeline can never run compilation or inference (design gap)The orchestrator instantiates strategies with no arguments: # genai_pipeline.py:163returnstage_cls(strategy_cls())But both strategies added here depend on an injected adapter that has no working default:
So a pipeline built via I understand the 2. Input data is never pushed to the device
# executorch_inference_strategy.py:90self._adapter.push_artifacts(artifact_paths=input_config.artifact_paths)
3. |
qti-horodnic
commented
Aug 28, 2026
Addressing Claude's comments:
|
…ence strategy implementations
Uh oh!
There was an error while loading. Please reload this page.
Summary
This PR implements the compilation and inference strategy implementations, completing the strategy layer. Each strategy delegates to injectable adapter interfaces for testability.
What's included
Strategy implementations:
ExecuTorchCompilationStrategy: Compiles model to .pte artifacts viaCompilerAdapterexample_inputsexplicitly to the adapter (not viaextra_options) — mirrors the PR5 fix for the quantization stagecontext.extra_optionsto a compilation-relevant allow-listETRecordExecuTorchInferenceStrategy: Runs on-device inference viaDeviceRunnerAdapteroutput_datafrom execute if present, falls back to pulled file pathsETDumpDefaultCompilerAdapter:compile_modelsignature finalised — mirrorsto_edge_transform_and_lower_to_qnnargument-for-argument, so per-graph lowering inputs (
compile_specs,dep_table,passes_job,constant_methods) are explicit parameters rather thanextra_optionskeysNotImplementedError: the version this package needs isthe multi-graph one (graph-name-keyed dicts, single multi-method
.ptefor weightsharing), so it lands with the strategy-level fan-out that calls it rather than
being written single-graph and then replaced. Inject a custom
CompilerAdapterfor now.Config addition:
CompilationInputConfig.example_inputs: Optional[Tuple[Any, ...]]— sourced from the model viaModelLoaderAdapter.get_example_inputsOrchestrator wiring:
genai_pipeline.py_run_compilation: passesexample_inputs=model_prep_output.example_inputsUnit tests:
test_executorch_compilation_strategy.pytest_executorch_inference_strategy.pytest_compilation_input_config.pyPR Review Checklist
Related PRs
Test plan
Run only tests added in this PR:
Run only this PR's tests with coverage:
Result:
Run all
genai_pipelinetests:Run all tests with coverage:
Result: