Skip to content

Backport pr-919 to gold/2021 #930

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

Merged
merged 4 commits into from
Oct 14, 2022
Merged
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ project(dpctl

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)

# Option to generate code coverage report using llvm-cov and lcov.
option(DPCTL_GENERATE_COVERAGE
Expand Down
3 changes: 2 additions & 1 deletion examples/pybind11/onemkl_gemv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ find_library(mkl_sycl NAMES mkl_sycl PATHS ${MKL_LIBRARY_DIR} REQUIRED)
find_library(mkl_intel_ilp64 NAMES mkl_intel_ilp64 PATHS ${MKL_LIBRARY_DIR} REQUIRED)
find_library(mkl_tbb_thread NAMES mkl_tbb_thread PATHS ${MKL_LIBRARY_DIR} REQUIRED)
find_library(tbb NAMES tbb PATHS ${TBB_LIBRARY_DIR} REQUIRED)
find_library(OpenCL NAMES OpenCL REQUIRED)

set(py_module_name _onemkl)

Expand Down Expand Up @@ -64,7 +65,7 @@ target_include_directories(standalone_cpp
PUBLIC ${MKL_INCLUDE_DIR} ${TBB_INCLUDE_DIR} sycl_gemm
)
target_link_libraries(standalone_cpp
PRIVATE ${mkl_sycl} ${mkl_intel_ilp64} ${mkl_tbb_thread} ${mkl_core} ${tbb}
PRIVATE ${mkl_sycl} ${mkl_intel_ilp64} ${mkl_tbb_thread} ${mkl_core} ${tbb} ${OpenCL}
)

set(ignoreMe "${SKBUILD}")
8 changes: 7 additions & 1 deletion libsyclinterface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ if(DPCTL_ENABLE_L0_PROGRAM_CREATION)
OUTPUT_VARIABLE LIBZE_LOADER_FILENAME
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
)
set(LIBZE_LOADER_FILENAME ${LIBZE_LOADER_FILENAME} PARENT_SCOPE)
endif()
set(LIBZE_LOADER_FILENAME ${LIBZE_LOADER_FILENAME} PARENT_SCOPE)
endif()

if (UNIX)
Expand All @@ -86,8 +88,12 @@ if (UNIX)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
)
set(LIBCL_LOADER_FILENAME ${LIBCL_LOADER_FILENAME} PARENT_SCOPE)
endif()

message(STATUS "LIB_ZE: ${LIBZE_LOADER_FILENAME}")
message(STATUS "LIB_CL: ${LIBCL_LOADER_FILENAME}")

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/Config/dpctl_config.h.in
${CMAKE_CURRENT_SOURCE_DIR}/include/Config/dpctl_config.h
Expand Down
2 changes: 1 addition & 1 deletion libsyclinterface/include/Config/dpctl_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/* Defined when dpctl was built with level zero program creation enabled. */
#cmakedefine DPCTL_ENABLE_L0_PROGRAM_CREATION \
@DPCTL_ENABLE_L0_PROGRAM_CREATION @
@DPCTL_ENABLE_L0_PROGRAM_CREATION@

/* The DPCPP version used to build dpctl */
#define DPCTL_DPCPP_VERSION "@IntelSycl_VERSION@"
Expand Down