Skip to content

Fix XNNPACK build on Windows #13259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: gh/GregoryComer/115/head
Choose a base branch
from

Conversation

GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Aug 9, 2025

Fix a few build-blocking issues on Windows. Enable XNNPACK on the Windows preset. This also gives CI coverage.

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Aug 9, 2025

🔗 Helpful Links

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

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

❌ 3 New Failures, 14 Cancelled Jobs

As of commit 54b32b4 with merge base ffb47e3 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

GregoryComer added a commit that referenced this pull request Aug 9, 2025
ghstack-source-id: cf9cd1c
ghstack-comment-id: 3172080268
Pull-Request: #13259
@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 Aug 9, 2025
@GregoryComer GregoryComer marked this pull request as ready for review August 9, 2025 21:12
GregoryComer and others added 3 commits August 9, 2025 20:12
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@@ -59,7 +59,7 @@ foreach(fbs_file ${_xnnpack_schema__srcs})
)
endforeach()

if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
if(WIN32)

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this will actually not work, as WIN32 is set when the target in Windows, not the host. If we're cross compiling (for Android, for example), from a Windows host, we'll still want to use Powershell. Though feel free to correct me if I'm misunderstanding.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
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.

2 participants