[QNN EP] Add cross-device prepare/run/compare subcommands to encryption_test.py - #883
Open
tzuhsuanwei wants to merge 1 commit into
Open
tzuhsuanwei wants to merge 1 commit into
tzuhsuanwei wants to merge 1 commit into
Conversation
…on_test.py The one-shot mode requires prepare_app and run_app on the same machine, which cannot work for the UC2 scenario (compile on an x86_64 host with no NPU, run on a separate ARM64 device with real HTP hardware) — the two executables never coexist on one box in that setup. Add "prepare", "run", and "compare" subcommands so each phase can run independently on its own machine, with intermediate files (enc_ctx.onnx, enc_cipher.bin, answer_prepare.raw, answer_run.raw) copied between them manually (e.g. via scp). The original one-shot behavior is preserved under a new "both" subcommand for same-machine use.
tzuhsuanwei
requested review from
qti-chuteng,
qti-kromero and
tirupath-qti
as code owners
September 29, 2026 09:27
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
encryption_test.py's one-shot mode requiresprepare_appandrun_appon the same machine, which cannot work for the UC2 scenario (compile on an x86_64 host with no NPU, run on a separate ARM64 device with real HTP hardware) — the two executables never coexist on one box in that setup.prepare,run, andcomparesubcommands so each phase can run independently on its own machine, with intermediate files (enc_ctx.onnx,enc_cipher.bin,answer_prepare.raw,answer_run.raw) copied between machines manually (e.g. viascp).bothsubcommand for same-machine use — no behavior change for existing callers other than needing to addbothas the first argument.qcom/samples/ep_context_encryption/encryption_test.pyis touched; no other files changed.Test plan
bothsubcommand reproduces the original round-trip result on a real V81 ARM64 device (PASS: 1000 value(s) within 0.001 (max |diff| = 0.0))prepare→run→comparesplit produces the identical PASS result when run as three separate invocationspython -m py_compileclean