Repository navigation
Qualcomm AI Engine Direct - Add QNN/HTP joint-graph training toy example - #24205
likhitanavali wants to merge 2 commits into
Conversation
|
Hi @likhitanavali! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
|
|
@pytorchbot label "release notes: qualcomm" |
|
@claude review this pr |
|
Claude finished @psiddh's task in 3m 41s —— View job This PR adds a QNN/HTP joint-graph training toy example, but four problems need fixing before merge: Detailed reviewPR Review: #24205SummaryThis PR adds a self-contained example under Code Quality
Infrastructure
Testing
API Design
RecommendationRequest Changes These issues block merge:
Each is a small fix. Some CI coverage of the export path is also strongly recommended, given the dependence on private torch APIs. |
|
@psiddh, I’ve addressed Claude’s code review suggestions. Thank you! |
Summary
Add a minimal, self-contained QNN/HTP joint-graph training example under examples/qualcomm/training/. A 4-layer bias-free toy model is exported as a joint forward+backward graph via aot_export_joint_with_descriptors, lowered to the QNN delegate, and exercised through a full train → inference pipeline using real Hexagon hardware (C++ qnn_toy_model_trainer / qnn_toy_model_inference). Trained weights are saved as trained_model.safetensors and consumed by the inference runners. A run_toy_model.py script handles push, training, and inference to a connected Android device in one command.
A clean baseline for QNN/HTP training bring-up.
Release notes: examples: Add minimal QNN/HTP on-device training example (examples/qualcomm/training/): exports a toy model as a joint forward+backward graph, trains on real Hexagon/HTP hardware via C++ runners and runs inference from the trained weights.
Test plan
examples/qualcomm/training/run_toy_model.pytest_toy_model_training_exportinbackends/qualcomm/tests/test_qnn_delegate.pyto cover the export path