@@ -27,28 +27,21 @@ FetchContent_MakeAvailable(pybind11)
2727find_package (Python REQUIRED COMPONENTS Development.Module NumPy)
2828find_package (Dpctl REQUIRED)
2929
30- find_library (mkl_core NAMES mkl_core PATHS ${MKL_LIBRARY_DIR} REQUIRED)
31- find_library (mkl_sycl NAMES mkl_sycl PATHS ${MKL_LIBRARY_DIR} REQUIRED)
32- find_library (mkl_intel_ilp64 NAMES mkl_intel_ilp64 PATHS ${MKL_LIBRARY_DIR} REQUIRED)
33- find_library (mkl_tbb_thread NAMES mkl_tbb_thread PATHS ${MKL_LIBRARY_DIR} REQUIRED)
34- find_library (tbb NAMES tbb PATHS ${TBB_LIBRARY_DIR} REQUIRED)
35- find_library (OpenCL NAMES OpenCL REQUIRED)
30+ find_package (TBB REQUIRED)
31+
32+ set (MKL_ARCH "intel64" )
33+ set (MKL_LINK "dynamic" )
34+ set (MKL_THREADING "tbb_thread" )
35+ set (MKL_INTERFACE "ilp64" )
36+ find_package (MKL REQUIRED)
3637
3738set (py_module_name _onemkl)
3839
3940set (_sources sycl_gemm/_onemkl.cpp)
40- pybind11_add_module(${py_module_name}
41- MODULE
42- ${_sources}
43- )
41+ pybind11_add_module(${py_module_name} MODULE ${_sources} )
4442add_sycl_to_target(TARGET ${py_module_name} SOURCES ${_sources} )
45- target_compile_definitions (${py_module_name} PRIVATE -DMKL_ILP64)
46- target_include_directories (${py_module_name}
47- PUBLIC ${MKL_INCLUDE_DIR} sycl_gemm
48- )
49- target_link_libraries (${py_module_name}
50- PRIVATE ${mkl_sycl} ${mkl_intel_ilp64} ${mkl_tbb_thread} ${mkl_core} ${tbb}
51- )
43+ target_include_directories (${py_module_name} PUBLIC sycl_gemm)
44+ target_link_libraries (${py_module_name} PRIVATE MKL::MKL_SYCL)
5245
5346install (TARGETS ${py_module_name} DESTINATION sycl_gemm)
5447target_include_directories (${py_module_name} PUBLIC ${Dpctl_INCLUDE_DIRS} )
@@ -70,11 +63,7 @@ add_executable(standalone_cpp
7063target_compile_options (standalone_cpp
7164 PRIVATE -O3 -Wno-deprecated-declarations
7265)
73- target_include_directories (standalone_cpp
74- PUBLIC ${MKL_INCLUDE_DIR} ${TBB_INCLUDE_DIR} sycl_gemm
75- )
76- target_link_libraries (standalone_cpp
77- PRIVATE ${mkl_sycl} ${mkl_intel_ilp64} ${mkl_tbb_thread} ${mkl_core} ${tbb} ${OpenCL}
78- )
66+ target_include_directories (standalone_cpp PUBLIC sycl_gemm)
67+ target_link_libraries (standalone_cpp PRIVATE MKL::MKL_SYCL)
7968
8069set (ignoreMe "${SKBUILD} " )
0 commit comments