This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Commit 1bed908
authored
fix(windows): always define _WIN32 preprocessor macro to prevent PyTorch compiling unsupported code (#275)
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.1 parent 106bb77 commit 1bed908
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
0 commit comments