Fix QNN simulator runner resolution (#19504)#19504
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19504
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 1 Pending, 3 Unrelated FailuresAs of commit 0df3bd2 with merge base c502916 ( NEW FAILURE - The following job has failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was 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. |
|
@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104701942. |
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR improves how the Qualcomm QNN simulator tests locate and invoke qnn_executor_runner by allowing an explicit runner path to be provided via environment variable, while preserving the existing build-folder-based default.
Changes:
- Read
QNN_EXECUTOR_RUNNERfrom the environment to determine the runner binary path. - Fall back to
${build_folder}/examples/qualcomm/executor_runner/qnn_executor_runnerwhen the env var is not set. - Use the resolved runner path when constructing the simulator subprocess command.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
digantdesai
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Summary: Materialize qnn_executor_runner as part of the QNN delegate simulator test target and pass its Buck-built path to the Python harness. Prefer that explicit runner path when running x86 simulator tests, while keeping the existing build_folder-based fallback for manual runs. Reviewed By: digantdesai Differential Revision: D104701942
Summary: Materialize qnn_executor_runner as part of the QNN delegate simulator test target and pass its Buck-built path to the Python harness. Prefer that explicit runner path when running x86 simulator tests, while keeping the existing build_folder-based fallback for manual runs. Reviewed By: digantdesai Differential Revision: D104701942
| env_runner = os.environ.get("QNN_EXECUTOR_RUNNER") | ||
| runner_from_env = bool(env_runner and env_runner.strip()) | ||
| if runner_from_env: | ||
| qnn_executor_runner = env_runner | ||
| else: | ||
| qnn_executor_runner = os.path.join( | ||
| build_folder, | ||
| "examples/qualcomm/executor_runner/qnn_executor_runner", | ||
| ) |
| if not os.path.isfile(qnn_executor_runner): | ||
| if runner_from_env: | ||
| raise FileNotFoundError( | ||
| f"QNN_EXECUTOR_RUNNER is set to {qnn_executor_runner!r} " | ||
| "but no executable file exists at that path. Update the " | ||
| "environment variable to point at the built " | ||
| "qnn_executor_runner binary." | ||
| ) |
Summary:
Materialize qnn_executor_runner as part of the QNN delegate simulator test target and pass its Buck-built path to the Python harness. Prefer that explicit runner path when running x86 simulator tests, while keeping the existing build_folder-based fallback for manual runs.
Reviewed By: digantdesai
Differential Revision: D104701942