Skip to content

Commit 3a0e008

Browse files
Nicoshevfacebook-github-bot
authored andcommitted
Remove AVX compilation on aarch64 builds
Summary: X-link: facebookresearch/FBGEMM#2056 We are no longer using SIMDE to build AVX code targeting aarch64 Build times should decrease Reviewed By: mcfi Differential Revision: D85361586
1 parent c7ba1c9 commit 3a0e008

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/TransposeUtils.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ void transpose_simd(
5757
#else
5858
static const auto iset = fbgemmInstructionSet();
5959
// Run time CPU detection
60-
#if defined(FBGEMM_FBCODE) || !defined(__aarch64__)
60+
#if defined(FBGEMM_FBCODE) && (defined(__AVX512F__) || defined(__AVX2__))
6161
if (isZmm(iset)) {
62+
#ifdef __AVX512F__
6263
internal::transpose_avx512<T>(M, N, src, ld_src, dst, ld_dst);
64+
#endif
6365
} else if (isYmm(iset)) {
66+
#ifdef __AVX2__
6467
internal::transpose_avx2<T>(M, N, src, ld_src, dst, ld_dst);
68+
#endif
6569
} else
6670
#endif
6771
{

src/UtilsAvx2.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
namespace fbgemm::internal {
1717

18+
#ifdef __AVX2__
19+
1820
template <>
1921
void transpose_avx2(
2022
int64_t M,
@@ -336,4 +338,6 @@ void transpose_avx2(
336338
}
337339
}
338340

341+
#endif // __AVX2__
342+
339343
} // namespace fbgemm::internal

src/UtilsAvx512.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ namespace fbgemm {
1616

1717
namespace {
1818

19+
#ifdef __AVX512F__
20+
1921
// 16 * 6 = 96 instructions
2022
inline void transpose_kernel_16x16_avx512(
2123
const float* src,
@@ -2441,6 +2443,8 @@ void transpose_avx512(
24412443
}
24422444
}
24432445

2446+
#endif // __AVX512F__
2447+
24442448
} // namespace internal
24452449

24462450
} // namespace fbgemm

0 commit comments

Comments
 (0)