Skip to content

Commit 327e94f

Browse files
abalibfacebook-github-bot
authored andcommitted
Add __s390x__ compiler define for s390 builds. (#26233)
Summary: pytorch builds fail on 390 architecture because in simd.h the ifdef macros default to an x86 asm instruction. This patchs adds an ifdef __s390x__ to be able to build on s390. Pull Request resolved: #26233 Differential Revision: D17392714 Pulled By: soumith fbshipit-source-id: 037672bfea64fc5e52da2390d93b973534137c12
1 parent 06c69ad commit 327e94f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

aten/src/TH/vector/simd.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ static inline uint32_t detectHostSIMDExtensions()
7272

7373
#endif
7474

75+
#elif defined(__s390x__)
76+
77+
static inline uint32_t detectHostSIMDExtensions()
78+
{
79+
return SIMDExtension_DEFAULT;
80+
}
81+
7582
#elif defined(__PPC64__)
7683

7784
#if defined(__VSX__)

0 commit comments

Comments
 (0)