Skip to content

Commit

Permalink
fbgemm_gpu non avx512 build
Browse files Browse the repository at this point in the history
Differential Revision: D29978929

fbshipit-source-id: 37b8b302c51e853ee182e83b28cb7560f207f322
  • Loading branch information
jianyuh authored and facebook-github-bot committed Jul 29, 2021
1 parent bc3560b commit cf730e0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
5 changes: 3 additions & 2 deletions fbgemm_gpu/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
long_description = f.read()

extra_compile_args = sysconfig.get_config_var("CFLAGS").split()
extra_compile_args += ["-mavx2", "-mf16c", "-mfma", "-mavx512f", "-mavx512bw", "-mavx512dq", "-mavx512vl"]
# extra_compile_args += ["-mavx2", "-mf16c", "-mfma", "-mavx512f", "-mavx512bw", "-mavx512dq", "-mavx512vl"]
extra_compile_args += ["-mavx2", "-mf16c", "-mfma"]

OPTIMIZERS = [
"adagrad",
Expand All @@ -41,7 +42,7 @@

cpp_fbgemm_files = [
"../src/EmbeddingSpMDMAvx2.cc",
"../src/EmbeddingSpMDMAvx512.cc",
# "../src/EmbeddingSpMDMAvx512.cc",
"../src/EmbeddingSpMDM.cc",
"../src/EmbeddingSpMDMNBit.cc",
"../src/QuantUtils.cc",
Expand Down
40 changes: 20 additions & 20 deletions include/fbgemm/FbgemmEmbedding.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,28 +258,28 @@ FBGEMM_API bool EmbeddingSpMDMBlockSize1_(
bool is_weight_positional = false,
bool use_offsets = true);

template <typename IndexType, bool HAS_WEIGHTS>
void compressed_indices_remap_avx512(
std::int32_t offsets_numel,
const IndexType* indices,
const int32_t* compressed_indices_mapping,
const IndexType* offsets,
const float* weights, // optional, can be null,
IndexType* out_indices,
IndexType* out_offsets,
float* out_weights);
// template <typename IndexType, bool HAS_WEIGHTS>
// void compressed_indices_remap_avx512(
// std::int32_t offsets_numel,
// const IndexType* indices,
// const int32_t* compressed_indices_mapping,
// const IndexType* offsets,
// const float* weights, // optional, can be null,
// IndexType* out_indices,
// IndexType* out_offsets,
// float* out_weights);

} // namespace internal

template <typename IndexType>
FBGEMM_API void compressed_indices_remap(
std::int32_t offsets_numel,
const IndexType* indices,
const int32_t* compressed_indices_mapping,
const IndexType* offsets,
const float* weights, // optional, can be null,
IndexType* out_indices,
IndexType* out_offsets,
float* out_weights);
// template <typename IndexType>
// FBGEMM_API void compressed_indices_remap(
// std::int32_t offsets_numel,
// const IndexType* indices,
// const int32_t* compressed_indices_mapping,
// const IndexType* offsets,
// const float* weights, // optional, can be null,
// IndexType* out_indices,
// IndexType* out_offsets,
// float* out_weights);

} // namespace fbgemm

0 comments on commit cf730e0

Please sign in to comment.