Skip to content

Commit 5beb3e6

Browse files
joshuuuasumeta-codesync[bot]
authored andcommitted
Back out "Add EmbeddingSpMDM8Bit_Sve" (#4961)
Summary: Pull Request resolved: #4961 X-link: https://github.com/facebookresearch/FBGEMM/pull/1980 Original commit changeset: fa17a82bbeea Original Phabricator Diff: D72112120 introduced an issue that caused prediction results off for some IG models. Specifically, the scale (L2-norm) of the returned tensor is off by 10%, see S567079 for details. Backing it out to mitigate S556160. Reviewed By: q10 Differential Revision: D83710388 fbshipit-source-id: 67fc03282cefa81f2a195732e5bda5d285c99f7a
1 parent 1abdbdc commit 5beb3e6

File tree

6 files changed

+6
-658
lines changed

6 files changed

+6
-658
lines changed

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ cc_library(
152152
],
153153
":linux-aarch64": [
154154
"-fopenmp",
155-
"-march=armv9-a+sve2+fp16+bf16",
155+
"-march=armv9-a+sve2+fp16",
156156
],
157157
"//conditions:default": [],
158158
}),

include/fbgemm/FbgemmEmbedding.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -362,31 +362,6 @@ void compressed_indices_remap_avx512(
362362
float* out_weights);
363363
#endif
364364

365-
// Specialization for uint8_t* input on aarch64 called by GenerateEmbeddingSpMDM
366-
template <
367-
typename IndexType,
368-
typename OffsetType,
369-
typename OutType,
370-
bool NoBag,
371-
bool EnablePrefetching>
372-
FBGEMM_API bool EmbeddingSpMDM8Bit_Sve(
373-
const int64_t block_size,
374-
const int64_t output_size,
375-
const int64_t index_size,
376-
const int64_t data_size,
377-
const uint8_t* input,
378-
const IndexType* indices,
379-
const OffsetType* offsets_or_lengths,
380-
const float* weights, // optional, can be null for non-weighted sum
381-
const bool normalize_by_lengths,
382-
OutType* out,
383-
const bool is_weight_positional,
384-
const bool use_offsets,
385-
const int64_t output_stride,
386-
const int64_t input_stride,
387-
const bool scale_bias_last,
388-
const bool is_bf16_out);
389-
390365
} // namespace internal
391366

392367
template <typename IndexType>

include/fbgemm/Utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#ifndef HAVE_SVE
2424
#if defined(__aarch64__) && __ARM_FEATURE_SVE
2525
#define HAVE_SVE 1
26-
#include <arm_neon_sve_bridge.h> // @manual
27-
#include <arm_sve.h>
2826
#else
2927
#define HAVE_SVE 0
3028
#endif

src/EmbeddingSpMDM.cc

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <tuple>
1919
#include "./CodeCache.h" // @manual
2020
#include "./EmbeddingSpMDMAutovec.h" // @manual
21-
#include "./EmbeddingSpMDMSve.h"
2221
#include "./MaskAvx2.h" // @manual
2322
#include "./RefImplementations.h" // @manual
2423
#include "fbgemm/FbgemmEmbedding.h"
@@ -1127,76 +1126,6 @@ typename EmbeddingSpMDMKernelSignature<inType, indxType, offsetType, outType>::
11271126
}
11281127
#endif // CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
11291128

1130-
#if HAVE_SVE
1131-
if constexpr (std::is_same<inType, uint8_t>::value) {
1132-
if (!is_asmjit_disabled()) {
1133-
if (no_bag) {
1134-
return [=](int64_t output_size,
1135-
int64_t index_size,
1136-
int64_t data_size,
1137-
const uint8_t* input_u8,
1138-
const indxType* indices,
1139-
const offsetType* offsets_or_lengths,
1140-
const float*
1141-
weights, // optional, can be null for non-weighted sum
1142-
outType* out) {
1143-
return internal::
1144-
EmbeddingSpMDM8Bit_Sve<indxType, offsetType, outType, true, true>(
1145-
block_size,
1146-
output_size,
1147-
index_size,
1148-
data_size,
1149-
input_u8,
1150-
indices,
1151-
offsets_or_lengths,
1152-
weights,
1153-
normalize_by_lengths,
1154-
out,
1155-
is_weight_positional,
1156-
use_offsets,
1157-
output_stride,
1158-
input_stride,
1159-
scale_bias_last,
1160-
is_bf16_out);
1161-
};
1162-
} else {
1163-
return [=](int64_t output_size,
1164-
int64_t index_size,
1165-
int64_t data_size,
1166-
const uint8_t* input_u8,
1167-
const indxType* indices,
1168-
const offsetType* offsets_or_lengths,
1169-
const float* weights, // optional, can be null for
1170-
// non-weighted sum
1171-
outType* out) {
1172-
return internal::EmbeddingSpMDM8Bit_Sve<
1173-
indxType,
1174-
offsetType,
1175-
outType,
1176-
false,
1177-
true>(
1178-
block_size,
1179-
output_size,
1180-
index_size,
1181-
data_size,
1182-
input_u8,
1183-
indices,
1184-
offsets_or_lengths,
1185-
weights,
1186-
normalize_by_lengths,
1187-
out,
1188-
is_weight_positional,
1189-
use_offsets,
1190-
output_stride,
1191-
input_stride,
1192-
scale_bias_last,
1193-
is_bf16_out);
1194-
};
1195-
};
1196-
}
1197-
}
1198-
#endif
1199-
12001129
#ifdef FBGEMM_AUTOVEC_AVAILABLE
12011130
if (!cpuinfo_initialize()) {
12021131
throw std::runtime_error("Failed to initialize cpuinfo!");

0 commit comments

Comments
 (0)