Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

fix(windows): always define _WIN32 preprocessor macro to prevent PyTorch compiling unsupported code#275

Merged
mfuntowicz merged 1 commit into
mainfrom
windows_preprocessor_macro_detection
Oct 23, 2025
Merged

fix(windows): always define _WIN32 preprocessor macro to prevent PyTorch compiling unsupported code#275
mfuntowicz merged 1 commit into
mainfrom
windows_preprocessor_macro_detection

Conversation

@mfuntowicz
Copy link
Copy Markdown
Member

PyTorch (especially dynamo) relies on the preprocessor macro _WIN32 to guard compilation of code sections in some places when targetting Windows.

This macro is defined by MSVC defacto but, NVCC and others are not setting it by default which can lead to compilation errors.

This PR ensures the macro is defined when targetting Windows platform so we can safely rely its availability for the preprocessor.

@mfuntowicz mfuntowicz requested a review from danieldk October 23, 2025 08:18
Copy link
Copy Markdown
Contributor

@MekkCyber MekkCyber left a comment

Choose a reason for hiding this comment

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

SG Thanks !

@mfuntowicz mfuntowicz merged commit 1bed908 into main Oct 23, 2025
28 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants