Skip to content

Fix QNN simulator runner resolution (#19504)#19504

Open
psiddh wants to merge 1 commit into
pytorch:mainfrom
psiddh:export-D104701942
Open

Fix QNN simulator runner resolution (#19504)#19504
psiddh wants to merge 1 commit into
pytorch:mainfrom
psiddh:export-D104701942

Conversation

@psiddh
Copy link
Copy Markdown
Contributor

@psiddh psiddh commented May 12, 2026

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

Copilot AI review requested due to automatic review settings May 12, 2026 07:12
@psiddh psiddh requested a review from abhinaykukkadapu as a code owner May 12, 2026 07:12
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 12, 2026

🔗 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 SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure, 1 Pending, 3 Unrelated Failures

As of commit 0df3bd2 with merge base c502916 (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 12, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 12, 2026

@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104701942.

@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_RUNNER from the environment to determine the runner binary path.
  • Fall back to ${build_folder}/examples/qualcomm/executor_runner/qnn_executor_runner when 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.

Comment thread backends/qualcomm/tests/utils.py Outdated
Copy link
Copy Markdown
Contributor

@digantdesai digantdesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot changed the title Fix QNN simulator runner resolution Fix QNN simulator runner resolution (#19504) May 13, 2026
psiddh added a commit to psiddh/executorch that referenced this pull request May 13, 2026
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
@psiddh psiddh force-pushed the export-D104701942 branch from eabacf3 to fd69c23 Compare May 13, 2026 06:52
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
Copilot AI review requested due to automatic review settings May 13, 2026 08:13
@psiddh psiddh force-pushed the export-D104701942 branch from fd69c23 to 0df3bd2 Compare May 13, 2026 08:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +439 to +447
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",
)
Comment on lines +448 to +455
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."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants