Skip to content
Draft
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,18 @@ set_target_properties(${_trgt} PROPERTIES
CMAKE_POSITION_INDEPENDENT_CODE ON
C_STANDARD 99
)
target_include_directories(${_trgt} PUBLIC mkl_umath/src/ ${Python_NumPy_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
target_include_directories(${_trgt} PUBLIC mkl_umath/src/ mkl_umath/src/npyv/ ${Python_NumPy_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
target_link_libraries(${_trgt} PUBLIC MKL::MKL ${Python_LIBRARIES})
target_link_options(${_trgt} PUBLIC ${_linker_options})
target_compile_options(${_trgt} PUBLIC -fveclib=SVML)
target_compile_options(${_trgt} PUBLIC -fvectorize)
if(OPTIMIZATION_REPORT)
target_compile_options(${_trgt} PRIVATE -qopt-report=3)
endif()
# Enable AVX2 for npyv SIMD acceleration
# -mvzeroupper: Prefer VEX encoding even for scalar ops
# -mtune=native: Optimize for build machine (can change to -mtune=haswell for generic AVX2)
target_compile_options(${_trgt} PUBLIC -mavx2 -mfma -mvzeroupper)
install(TARGETS ${_trgt}
LIBRARY DESTINATION mkl_umath
ARCHIVE DESTINATION mkl_umath
Expand Down
Loading
Loading