Skip to content

Fix portable library build on Windows - #13700

Merged
GregoryComer merged 2 commits into
mainfrom
gh/GregoryComer/144/head
Aug 27, 2025
Merged

Fix portable library build on Windows#13700
GregoryComer merged 2 commits into
mainfrom
gh/GregoryComer/144/head

Conversation

@GregoryComer

@GregoryComerGregoryComer commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Note: This is a cherry-pick / identical copy of the existing approved PR (#13260). I inadvertently broke the ghstack when attempting to re-order the stack, leading to the old PR being merged by ghstack into the ghstack-created branch (not main).

Enable build of the portable operator library (and executor_runner, now that we have portable) on the Windows preset. There are a couple of patterns that weren't building on Windows. Both std::nan and std::signbit complain about ambiguous overload resolution when given an integer argument.

To solve the std::isnan issue, I introduced isnan_override in math_util.h, following the naming pattern from max_override / min_override / etc. in the same file. It adds a specialized branch for integers to avoid calling std::isnan. For std::signbit, I just locally specialized.

I also re-enabled optimized and quantized kernel libraries in the Windows preset, as they now build with this change.

[ghstack-poisoned]
@GregoryComer

GregoryComer commented Aug 26, 2025

Copy link
Copy Markdown
ContributorAuthor

@pytorch-bot

pytorch-botBot commented Aug 26, 2025

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit bca23f5 with merge base 5afe90d (image):

NEW FAILURES - The following jobs have failed:

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

GregoryComer added a commit that referenced this pull request Aug 26, 2025
ghstack-source-id: b8d0bd4
ghstack-comment-id: 3225965920
Pull-Request: #13700
@meta-clameta-claBot 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 26, 2025
@GregoryComerGregoryComer added the release notes: none Do not include this in the release notes label Aug 26, 2025
@GregoryComer
GregoryComer marked this pull request as ready for review August 26, 2025 23:10
[ghstack-poisoned]
@GregoryComer
GregoryComer merged commit 8dff86a into mainAug 27, 2025
108 of 111 checks passed
@GregoryComer
GregoryComer deleted the gh/GregoryComer/144/head branch August 27, 2025 18:00
@GregoryComerGregoryComer mentioned this pull request Aug 28, 2025
20 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.release notes: noneDo not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@GregoryComer@mergennachin