@@ -27,28 +27,21 @@ FetchContent_MakeAvailable(pybind11)
27
27
find_package (Python REQUIRED COMPONENTS Development.Module NumPy )
28
28
find_package (Dpctl REQUIRED )
29
29
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 )
36
37
37
38
set (py_module_name _onemkl )
38
39
39
40
set (_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} )
44
42
add_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 )
52
45
53
46
install (TARGETS ${py_module_name} DESTINATION sycl_gemm )
54
47
target_include_directories (${py_module_name} PUBLIC ${Dpctl_INCLUDE_DIRS} )
@@ -70,11 +63,7 @@ add_executable(standalone_cpp
70
63
target_compile_options (standalone_cpp
71
64
PRIVATE -O3 -Wno-deprecated-declarations
72
65
)
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 )
79
68
80
69
set (ignoreMe "${SKBUILD} " )
0 commit comments