Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/EmbeddingSpMDM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,11 @@ typename EmbeddingSpMDMKernelSignature<uint8_t, indxType, offsetType, outType>::
}

#ifdef FBGEMM_AUTOVEC_AVAILABLE
if (!is_autovec_disabled()) {
// There is only the reference implementation for FP8 embedding
if (!cpuinfo_initialize()) {
throw std::runtime_error("Failed to initialize cpuinfo!");
}
if ((is_autovec_forced() || fbgemmHasArmSve2Support()) &&
!is_autovec_disabled()) {
return GenerateEmbeddingSpMDMFP8WithStrides_autovec<
/*IndexType=*/indxType,
/*OffsetType=*/offsetType,
Expand Down Expand Up @@ -1473,7 +1476,11 @@ GenerateEmbeddingSpMDMRowWiseSparse(
#endif

#ifdef FBGEMM_AUTOVEC_AVAILABLE
if (is_autovec_forced()) {
if (!cpuinfo_initialize()) {
throw std::runtime_error("Failed to initialize cpuinfo!");
}
if ((is_autovec_forced() || fbgemmHasArmSve2Support()) &&
!is_autovec_disabled()) {
return GenerateEmbeddingSpMDMRowWiseSparse_autovec<
/*InType=*/inType,
/*IndexType=*/indxType,
Expand Down
Loading