-
Notifications
You must be signed in to change notification settings - Fork 1
Add optional add_sycl_to_target to cmake #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ed505da
4c34df8
f51ff59
01452f1
59c3b76
337e9ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,17 +20,16 @@ | |
set(LIB_NAME onemkl_blas_cublas) | ||
set(LIB_OBJ ${LIB_NAME}_obj) | ||
find_package(cuBLAS REQUIRED) | ||
|
||
set(SOURCES cublas_level1.cpp | ||
cublas_level2.cpp | ||
cublas_level3.cpp | ||
cublas_batch.cpp | ||
cublas_extensions.cpp | ||
cublas_scope_handle.cpp | ||
$<$<BOOL:${BUILD_SHARED_LIBS}>: mkl_blas_cublas_wrappers.cpp>) | ||
add_library(${LIB_NAME}) | ||
add_library(${LIB_OBJ} OBJECT | ||
cublas_level1.cpp | ||
cublas_level2.cpp | ||
cublas_level3.cpp | ||
cublas_batch.cpp | ||
cublas_extensions.cpp | ||
cublas_scope_handle.cpp | ||
$<$<BOOL:${BUILD_SHARED_LIBS}>: mkl_blas_cublas_wrappers.cpp> | ||
) | ||
add_library(${LIB_OBJ} OBJECT ${SOURCES}) | ||
|
||
target_include_directories(${LIB_OBJ} | ||
PRIVATE ${PROJECT_SOURCE_DIR}/include | ||
${PROJECT_SOURCE_DIR}/src | ||
|
@@ -42,7 +41,9 @@ set_target_properties(${LIB_OBJ} PROPERTIES | |
POSITION_INDEPENDENT_CODE ON) | ||
|
||
target_link_libraries(${LIB_NAME} PUBLIC ${LIB_OBJ}) | ||
|
||
if (USE_ADD_SYCL_TO_TARGET_INTEGRATION) | ||
add_sycl_to_target(TARGET ${LIB_OBJ} SOURCES ${SOURCES}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we even have to specify the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hipSYCL doesn't need it, but it's the correct interface for portability, as e.g. ComputeCpp needs it AFAIK. |
||
endif() | ||
# Add major version to the library | ||
set_target_properties(${LIB_NAME} PROPERTIES | ||
SOVERSION ${PROJECT_VERSION_MAJOR} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah here it is... an alternative naming could be
ENABLE_HALF_DATA_TYPE
or similar (inspired by SYCL-BLAS..)