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
30 changes: 0 additions & 30 deletions cmake/modules/CxxCompilerSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,3 @@ endif()

# Enable compile commands to compile_commands.json for debugging
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

################################################################################
# Setup AVX2 and AVX512 Flags (for FBGEMM_GPU builds)
################################################################################

# Set flags for AVX2
set(AVX2_FLAGS "-mavx2;-mf16c;-mfma;-fopenmp")
if(NOT FBGEMM_BUILD_VARIANT STREQUAL BUILD_VARIANT_CPU AND WSL_MODE)
# NVCC in WSL complains about unknown -mavx options
# https://github.com/pytorch/FBGEMM/issues/2135
set(AVX2_FLAGS "-Xcompiler;-mavx;-Xcompiler;-mavx2;-Xcompiler;-mf16c;-Xcompiler;-mfma;-fopenmp")
endif()

# Set flags for AVX512
set(AVX512_FLAGS "-mavx2;-mf16c;-mfma;-mavx512f;-mavx512bw;-mavx512dq;-mavx512vl;-fopenmp")
if(NOT FBGEMM_BUILD_VARIANT STREQUAL BUILD_VARIANT_CPU AND WSL_MODE)
set(AVX512_FLAGS "-Xcompiler;-mavx2;-Xcompiler;-mf16c;-Xcompiler;-mfma;-Xcompiler;-mavx512f;-Xcompiler;-mavx512bw;-Xcompiler;-mavx512dq;-Xcompiler;-mavx512vl;-fopenmp")
endif()

BLOCK_PRINT(
"AVX2_FLAGS:"
""
"${AVX2_FLAGS}"
)

BLOCK_PRINT(
"AVX512_FLAGS:"
""
"${AVX512_FLAGS}"
)