Skip to content

Commit 7b2a4fd

Browse files
[ROCm][Windows] Fix clang cl build on Windows with Python 3.11 (#2578)
Added fix for build Pytorch with ROCm on Windows with Python 3.11. [PR with these changes](pytorch#159273) is already mrged to upstream main, but it needs to be added to pytorch 2.8. Co-authored-by: Scott Todd <[email protected]>
1 parent b2d453a commit 7b2a4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functorch/csrc/dim/arena.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <ATen/ATen.h>
99
#include "minpybind.h"
1010

11-
#ifdef _WIN32
11+
#if defined(_MSC_VER) && !defined(__clang__)
1212
#include <intrin.h>
1313
// https://stackoverflow.com/questions/355967/how-to-use-msvc-intrinsics-to-get-the-equivalent-of-this-gcc-code
1414
inline unsigned int __builtin_clz(unsigned int x) {

0 commit comments

Comments
 (0)