[ET][Windows] Fix ExecuTorch Windows host build portability defects#20898
Closed
SS-JIA wants to merge 3 commits into
Closed
[ET][Windows] Fix ExecuTorch Windows host build portability defects#20898SS-JIA wants to merge 3 commits into
SS-JIA wants to merge 3 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20898
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 32 PendingAs of commit c8ff70f with merge base ceecc9e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Gasoonjia
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Building ExecuTorch (Vulkan backend plus core runtime) for a Windows x86_64 host with the arvr clang toolchain surfaced three genuine portability defects that fail under its strict
-Werrorset and generated-header wiring. These are correct fixes independent of any warning-suppression workaround.In
runtime/core/portable_type/c10/c10/targets.bzl, the arvr-modeselectthat supplies the generatedATen/Config.hrouted every non-Android OS toovrsource_aten_Config.h, an OVR-native-onlyoxx_static_librarythat produces no output on the Windows host. The result wasfatal error: 'ATen/Config.h' file not foundin every CPU kernel that includes ATen vec headers. This adds anovr_config//os:windowsbranch pointing at the workinggenerated_aten_config_header, mirroring the existing Android fallback.In
backends/vulkan/runtime/api/containers/Tensor.h,size()anddim()returnedconst int64_tby value; the meaningless top-levelconston a scalar return trips-Werror,-Wignored-qualifiers. This header is included throughout the Vulkan backend, so it blockedvulkan_graph_runtime. Theconstqualifier is dropped.In
extension/data_loader/mman.handmman_windows.cpp,#define NOMINMAXwas unconditional while the toolchain already predefines it, tripping-Werror,-Wmacro-redefinedwhen compilingmmap_data_loader(pulled in byModule). Both sites are now guarded with#ifndef NOMINMAX.Differential Revision: D111811481