Skip to content

Qualcomm: expose PAL headers via header map so QNN runtime builds under Buck#20321

Merged
Gasoonjia merged 1 commit into
mainfrom
gasoonjia/qnn-pal-buck-include-fix
Jun 17, 2026
Merged

Qualcomm: expose PAL headers via header map so QNN runtime builds under Buck#20321
Gasoonjia merged 1 commit into
mainfrom
gasoonjia/qnn-pal-buck-include-fix

Conversation

@Gasoonjia

Copy link
Copy Markdown
Contributor

Summary

The PAL support added the pal/ sources and headers directly to the QNN runtime target and resolved #include <pal/...> with a hardcoded -Ibackends/qualcomm/runtime/pal/include preprocessor flag. That -I path is resolved relative to the Buck project root, so it does not resolve correctly across build roots and #include <pal/DynamicLoading.h> / <pal/Path.h> fail to compile when building the QNN runtime under Buck.

Fix

Move the PAL sources and headers into a dedicated pal library and expose the headers through a header map (a dict exported_headers with an empty header_namespace) instead of an -I flag. runtime picks it up via exported_deps, so dependents that include QnnImplementation.h resolve <pal/...> too. This mirrors what the CMake build already does with include_directories(runtime/pal/include), and does not disturb the runtime target's namespaced <executorch/...> exported headers.

No functional change — Buck build wiring only.

…er Buck

The PAL support added pal/ sources and headers directly to the qnn `runtime`
target and resolved <pal/...> includes with a hardcoded
`-Ibackends/qualcomm/runtime/pal/include` preprocessor flag. That -I path is
resolved relative to the Buck project root, so it does not resolve correctly
across build roots and `#include <pal/...>` fails to compile.

Move the PAL sources/headers into a dedicated `pal` library and expose the
headers through a header map (dict `exported_headers` + empty
`header_namespace`); `runtime` depends on it via `exported_deps`. The short
<pal/...> include then resolves the same way the CMake build's
`include_directories(runtime/pal/include)` does, without a hardcoded -I.

Signed-off-by: Gasoonjia <gasoonjia@icloud.com>
@pytorch-bot

pytorch-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20321

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 2 Pending, 3 Unrelated Failures

As of commit 8929a43 with merge base 218cc45 (image):

NEW FAILURES - The following jobs have 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 Jun 17, 2026
@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.

@psiddh

psiddh commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Thanks @Gasoonjia for this

@psiddh

psiddh commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

cc @shewu-quic @haowhsu-quic @winskuo-quic @chenweng-quic

@Gasoonjia Gasoonjia merged commit ed6e2e2 into main Jun 17, 2026
180 of 189 checks passed
@Gasoonjia Gasoonjia deleted the gasoonjia/qnn-pal-buck-include-fix branch June 17, 2026 07:00
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants