File tree 15 files changed +49
-53
lines changed
15 files changed +49
-53
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,6 @@ if(BUILD_SHARED_LIBS)
48
48
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR} >
49
49
$<INSTALL_INTERFACE:include >
50
50
)
51
- if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
52
- add_sycl_to_target(TARGET onemkl)
53
- endif ()
54
51
set_target_properties (onemkl PROPERTIES
55
52
SOVERSION ${PROJECT_VERSION_MAJOR}
56
53
)
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ set_target_properties(onemkl_blas PROPERTIES
37
37
POSITION_INDEPENDENT_CODE ON
38
38
)
39
39
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
40
- add_sycl_to_target(TARGET onemkl_blas)
40
+ add_sycl_to_target(TARGET onemkl_blas SOURCES blas_loader.cpp )
41
41
else ()
42
42
target_link_libraries (onemkl_blas PUBLIC ONEMKL::SYCL::SYCL)
43
43
endif ()
Original file line number Diff line number Diff line change 20
20
set (LIB_NAME onemkl_blas_cublas)
21
21
set (LIB_OBJ ${LIB_NAME} _obj)
22
22
find_package (cuBLAS REQUIRED)
23
-
23
+ set (SOURCES cublas_level1.cpp
24
+ cublas_level2.cpp
25
+ cublas_level3.cpp
26
+ cublas_batch.cpp
27
+ cublas_extensions.cpp
28
+ cublas_scope_handle.cpp
29
+ $<$<BOOL :${BUILD_SHARED_LIBS} >: mkl_blas_cublas_wrappers.cpp>)
24
30
add_library (${LIB_NAME} )
25
- add_library (${LIB_OBJ} OBJECT
26
- cublas_level1.cpp
27
- cublas_level2.cpp
28
- cublas_level3.cpp
29
- cublas_batch.cpp
30
- cublas_extensions.cpp
31
- cublas_scope_handle.cpp
32
- $<$<BOOL :${BUILD_SHARED_LIBS} >: mkl_blas_cublas_wrappers.cpp>
33
- )
31
+ add_library (${LIB_OBJ} OBJECT ${SOURCES} )
32
+
34
33
target_include_directories (${LIB_OBJ}
35
34
PRIVATE ${PROJECT_SOURCE_DIR} /include
36
35
${PROJECT_SOURCE_DIR} /src
@@ -43,8 +42,7 @@ set_target_properties(${LIB_OBJ} PROPERTIES
43
42
44
43
target_link_libraries (${LIB_NAME} PUBLIC ${LIB_OBJ} )
45
44
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
46
- add_sycl_to_target(TARGET ${LIB_NAME} )
47
- add_sycl_to_target(TARGET ${LIB_OBJ} )
45
+ add_sycl_to_target(TARGET ${LIB_OBJ} SOURCES ${SOURCES} )
48
46
endif ()
49
47
# Add major version to the library
50
48
set_target_properties (${LIB_NAME} PROPERTIES
Original file line number Diff line number Diff line change @@ -21,16 +21,13 @@ set(LIB_NAME onemkl_blas_mklcpu)
21
21
set (LIB_OBJ ${LIB_NAME} _obj)
22
22
23
23
find_package (MKL REQUIRED)
24
-
25
- add_library (${LIB_NAME} )
26
- add_library (${LIB_OBJ} OBJECT
27
- fp16.hpp mklcpu_common.hpp
24
+ set (SOURCES fp16.hpp mklcpu_common.hpp
28
25
mklcpu_level1.cpp mklcpu_level2.cpp mklcpu_level3.cpp mklcpu_batch.cpp mklcpu_extensions.cpp
29
- $<$<BOOL :${BUILD_SHARED_LIBS} >: mklcpu_wrappers.cpp>
30
- )
26
+ $<$<BOOL :${BUILD_SHARED_LIBS} >: mklcpu_wrappers.cpp>)
27
+ add_library (${LIB_NAME} )
28
+ add_library (${LIB_OBJ} OBJECT ${SOURCES} )
31
29
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
32
- add_sycl_to_target(TARGET ${LIB_NAME} )
33
- add_sycl_to_target(TARGET ${LIB_OBJ} )
30
+ add_sycl_to_target(TARGET ${LIB_OBJ} ${SOURCES} )
34
31
endif ()
35
32
36
33
target_include_directories (${LIB_OBJ}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ set_target_properties(onemkl_rng PROPERTIES
38
38
POSITION_INDEPENDENT_CODE ON
39
39
)
40
40
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
41
- add_sycl_to_target(TARGET onemkl_rng)
41
+ add_sycl_to_target(TARGET onemkl_rng SOURCES rng_loader.cpp )
42
42
else ()
43
43
target_link_libraries (onemkl_rng PUBLIC ONEMKL::SYCL::SYCL)
44
44
endif ()
Original file line number Diff line number Diff line change @@ -21,13 +21,14 @@ set(LIB_NAME onemkl_rng_curand)
21
21
set (LIB_OBJ ${LIB_NAME} _obj)
22
22
find_package (cuRAND REQUIRED)
23
23
24
- add_library (${LIB_NAME} )
25
- add_library (${LIB_OBJ} OBJECT
26
- philox4x32x10.cpp
24
+ set (SOURCES philox4x32x10.cpp
27
25
mrg32k3a.cpp
28
- $<$<BOOL :${BUILD_SHARED_LIBS} >: mkl_rng_curand_wrappers.cpp>
26
+ $<$<BOOL :${BUILD_SHARED_LIBS} >: mkl_rng_curand_wrappers.cpp>)
29
27
)
30
28
29
+ add_library (${LIB_NAME} )
30
+ add_library (${LIB_OBJ} OBJECT ${SOURCES} )
31
+
31
32
target_include_directories (${LIB_OBJ}
32
33
PRIVATE ${PROJECT_SOURCE_DIR} /include
33
34
${PROJECT_SOURCE_DIR} /src
@@ -43,8 +44,7 @@ set_target_properties(${LIB_OBJ} PROPERTIES
43
44
44
45
target_link_libraries (${LIB_NAME} PUBLIC ${LIB_OBJ} )
45
46
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
46
- add_sycl_to_target(TARGET ${LIB_OBJ} )
47
- add_sycl_to_target(TARGET ${LIB_NAME} )
47
+ add_sycl_to_target(TARGET ${LIB_OBJ} SOURCES ${SOURCES} )
48
48
endif ()
49
49
# Add major version to the library
50
50
set_target_properties (${LIB_NAME} PROPERTIES
Original file line number Diff line number Diff line change @@ -22,14 +22,16 @@ set(LIB_OBJ ${LIB_NAME}_obj)
22
22
23
23
find_package (MKL REQUIRED)
24
24
25
- add_library (${LIB_NAME} )
26
- add_library (${LIB_OBJ} OBJECT
27
- cpu_common.hpp
25
+ set (SOURCES cpu_common.hpp
28
26
philox4x32x10.cpp
29
27
mrg32k3a.cpp
30
28
$<$<BOOL :${BUILD_SHARED_LIBS} >: mkl_rng_cpu_wrappers.cpp>
31
29
)
32
30
31
+ add_library (${LIB_NAME} )
32
+ add_library (${LIB_OBJ} OBJECT ${SOURCES} )
33
+
34
+
33
35
target_include_directories (${LIB_OBJ}
34
36
PRIVATE ${PROJECT_SOURCE_DIR} /include
35
37
${PROJECT_SOURCE_DIR} /src
@@ -39,8 +41,7 @@ target_include_directories(${LIB_OBJ}
39
41
40
42
target_compile_options (${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT} ${MKL_COPT} )
41
43
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
42
- add_sycl_to_target(TARGET ${LIB_OBJ} )
43
- add_sycl_to_target(TARGET ${LIB_NAME} )
44
+ add_sycl_to_target(TARGET ${LIB_OBJ} SOURCES ${SOURCES} )
44
45
endif ()
45
46
target_link_libraries (${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL ${MKL_LINK_C} )
46
47
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ foreach(domain ${TARGET_DOMAINS})
59
59
add_executable (test_main_${domain} _ct main_test.cpp)
60
60
target_include_directories (test_main_${domain} _ct PUBLIC ${GTEST_INCLUDE_DIR} )
61
61
target_compile_options (test_main_${domain} _ct PRIVATE -fsycl)
62
+ if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
63
+ add_sycl_to_target(TARGET test_main_${domain} _ct SOURCES t main_test.cpp)
64
+ endif ()
62
65
63
66
if (BUILD_SHARED_LIBS )
64
67
add_executable (test_main_${domain} _rt main_test.cpp)
@@ -73,6 +76,9 @@ foreach(domain ${TARGET_DOMAINS})
73
76
onemkl
74
77
${${domain} _TEST_LIST_RT}
75
78
)
79
+ if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
80
+ add_sycl_to_target(TARGET test_main_${domain} _rt SOURCES main_test.cpp)
81
+ endif ()
76
82
endif ()
77
83
78
84
if (ENABLE_MKLCPU_BACKEND)
@@ -109,9 +115,6 @@ foreach(domain ${TARGET_DOMAINS})
109
115
ONEMKL::SYCL::SYCL
110
116
${${domain} _TEST_LIST_CT}
111
117
)
112
- if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
113
- add_sycl_to_target(TARGET test_main_${domain} _ct)
114
- endif ()
115
118
string (TOUPPER ${domain} DOMAIN_PREFIX)
116
119
117
120
if (BUILD_SHARED_LIBS )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if(BUILD_SHARED_LIBS)
33
33
)
34
34
target_link_libraries (blas_batch_rt PUBLIC ONEMKL::SYCL::SYCL)
35
35
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
36
- add_sycl_to_target(TARGET blas_batch_rt)
36
+ add_sycl_to_target(TARGET blas_batch_rt SOURCES ${BATCH_SOURCES} )
37
37
else ()
38
38
target_link_libraries (blas_batch_rt PUBLIC ONEMKL::SYCL::SYCL)
39
39
endif ()
@@ -51,7 +51,7 @@ target_include_directories(blas_batch_ct
51
51
)
52
52
target_link_libraries (blas_batch_ct PUBLIC ONEMKL::SYCL::SYCL)
53
53
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
54
- add_sycl_to_target(TARGET blas_batch_ct)
54
+ add_sycl_to_target(TARGET blas_batch_ct SOURCES ${BATCH_SOURCES} )
55
55
else ()
56
56
target_link_libraries (blas_batch_ct PUBLIC ONEMKL::SYCL::SYCL)
57
57
endif ()
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if(BUILD_SHARED_LIBS)
33
33
)
34
34
target_link_libraries (blas_extensions_rt PUBLIC ONEMKL::SYCL::SYCL)
35
35
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
36
- add_sycl_to_target(TARGET blas_extensions_rt)
36
+ add_sycl_to_target(TARGET blas_extensions_rt SOURCES ${EXTENSIONS_SOURCES} )
37
37
else ()
38
38
target_link_libraries (blas_extensions_rt PUBLIC ONEMKL::SYCL::SYCL)
39
39
endif ()
@@ -51,7 +51,7 @@ target_include_directories(blas_extensions_ct
51
51
)
52
52
target_link_libraries (blas_extensions_ct PUBLIC ONEMKL::SYCL::SYCL)
53
53
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
54
- add_sycl_to_target(TARGET blas_extensions_ct)
54
+ add_sycl_to_target(TARGET blas_extensions_ct SOURCES ${EXTENSIONS_SOURCES} )
55
55
else ()
56
56
target_link_libraries (blas_extensions_ct PUBLIC ONEMKL::SYCL::SYCL)
57
57
endif ()
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if(BUILD_SHARED_LIBS)
32
32
PUBLIC ${CBLAS_INCLUDE}
33
33
)
34
34
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
35
- add_sycl_to_target(TARGET blas_level1_rt)
35
+ add_sycl_to_target(TARGET blas_level1_rt SOURCES ${L1_SOURCES} )
36
36
else ()
37
37
target_link_libraries (blas_level1_rt PUBLIC ONEMKL::SYCL::SYCL)
38
38
endif ()
@@ -50,7 +50,7 @@ target_include_directories(blas_level1_ct
50
50
PUBLIC ${CBLAS_INCLUDE}
51
51
)
52
52
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
53
- add_sycl_to_target(TARGET blas_level1_ct)
53
+ add_sycl_to_target(TARGET blas_level1_ct SOURCES ${L1_SOURCES} )
54
54
else ()
55
55
target_link_libraries (blas_level1_ct PUBLIC ONEMKL::SYCL::SYCL)
56
56
endif ()
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if(BUILD_SHARED_LIBS)
32
32
PUBLIC ${CBLAS_INCLUDE}
33
33
)
34
34
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
35
- add_sycl_to_target(TARGET blas_level2_rt)
35
+ add_sycl_to_target(TARGET blas_level2_rt SOURCES ${L2_SOURCES} )
36
36
else ()
37
37
target_link_libraries (blas_level2_rt PUBLIC ONEMKL::SYCL::SYCL)
38
38
endif ()
@@ -49,7 +49,7 @@ target_include_directories(blas_level2_ct
49
49
PUBLIC ${CBLAS_INCLUDE}
50
50
)
51
51
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
52
- add_sycl_to_target(TARGET blas_level2_ct)
52
+ add_sycl_to_target(TARGET blas_level2_ct SOURCES ${L2_SOURCES} )
53
53
else ()
54
54
target_link_libraries (blas_level2_ct PUBLIC ONEMKL::SYCL::SYCL)
55
55
endif ()
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if(BUILD_SHARED_LIBS)
32
32
PUBLIC ${CBLAS_INCLUDE}
33
33
)
34
34
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
35
- add_sycl_to_target(TARGET blas_level3_rt)
35
+ add_sycl_to_target(TARGET blas_level3_rt SOURCES ${L3_SOURCES} )
36
36
else ()
37
37
target_link_libraries (blas_level3_rt PUBLIC ONEMKL::SYCL::SYCL)
38
38
endif ()
@@ -49,7 +49,7 @@ target_include_directories(blas_level3_ct
49
49
PUBLIC ${CBLAS_INCLUDE}
50
50
)
51
51
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
52
- add_sycl_to_target(TARGET blas_level3_ct)
52
+ add_sycl_to_target(TARGET blas_level3_ct SOURCES ${L3_SOURCES} )
53
53
else ()
54
54
target_link_libraries (blas_level3_ct PUBLIC ONEMKL::SYCL::SYCL)
55
55
endif ()
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ if(BUILD_SHARED_LIBS)
31
31
PUBLIC ${CMAKE_BINARY_DIR} /bin
32
32
)
33
33
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
34
- add_sycl_to_target(TARGET rng_service_rt)
34
+ add_sycl_to_target(TARGET rng_service_rt SOURCES ${SERVICE_TESTS_SOURCES} )
35
35
else ()
36
36
target_link_libraries (rng_service_rt PUBLIC ONEMKL::SYCL::SYCL)
37
37
endif ()
@@ -48,7 +48,7 @@ target_include_directories(rng_service_ct
48
48
)
49
49
target_link_libraries (rng_service_ct PUBLIC ONEMKL::SYCL::SYCL)
50
50
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
51
- add_sycl_to_target(TARGET rng_service_ct)
51
+ add_sycl_to_target(TARGET rng_service_ct SOURCES ${SERVICE_TESTS_SOURCES} )
52
52
else ()
53
53
target_link_libraries (rng_service_ct PUBLIC ONEMKL::SYCL::SYCL)
54
54
endif ()
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ if(BUILD_SHARED_LIBS)
31
31
PUBLIC ${CMAKE_BINARY_DIR} /bin
32
32
)
33
33
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
34
- add_sycl_to_target(TARGET rng_statistics_rt)
34
+ add_sycl_to_target(TARGET rng_statistics_rt SOURCES ${STATS_CHECK_SOURCES} )
35
35
else ()
36
36
target_link_libraries (rng_statistics_rt PUBLIC ONEMKL::SYCL::SYCL)
37
37
endif ()
@@ -47,7 +47,7 @@ target_include_directories(rng_statistics_ct
47
47
PUBLIC ${CMAKE_BINARY_DIR} /bin
48
48
)
49
49
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION)
50
- add_sycl_to_target(TARGET rng_statistics_ct)
50
+ add_sycl_to_target(TARGET rng_statistics_ct SOURCES ${STATS_CHECK_SOURCES} )
51
51
else ()
52
52
target_link_libraries (rng_statistics_ct PUBLIC ONEMKL::SYCL::SYCL)
53
53
endif ()
You can’t perform that action at this time.
0 commit comments