Skip to content

Commit

Permalink
Add __s390x__ compiler define for s390 builds. (#26233)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
abalib authored and facebook-github-bot committed Sep 16, 2019
1 parent 06c69ad commit 327e94f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aten/src/TH/vector/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ static inline uint32_t detectHostSIMDExtensions()

#endif

#elif defined(__s390x__)

static inline uint32_t detectHostSIMDExtensions()
{
return SIMDExtension_DEFAULT;
}

#elif defined(__PPC64__)

#if defined(__VSX__)
Expand Down

0 comments on commit 327e94f

Please sign in to comment.