File tree 4 files changed +29
-17
lines changed
4 files changed +29
-17
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,14 @@ check_cxx_compiler_flag("-fsycl" is_dpcpp)
25
25
if (is_dpcpp)
26
26
# Workaround for internal compiler error during linking if -fsycl is used
27
27
get_filename_component (SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY )
28
- find_library (SYCL_LIBRARY NAMES sycl PATHS "${SYCL_BINARY_DIR} /../lib" "${SYCL_BINARY_DIR} /lib" ENV LIBRARY_PATH ENV PATH )
28
+ find_library (SYCL_LIBRARY NAMES sycl
29
+ PATHS
30
+ "${SYCL_BINARY_DIR} /lib"
31
+ "${SYCL_BINARY_DIR} /../lib"
32
+ "${SYCL_BINARY_DIR} /../../lib"
33
+ ENV LIBRARY_PATH
34
+ ENV PATH
35
+ )
29
36
if (NOT SYCL_LIBRARY)
30
37
message (FATAL_ERROR "SYCL library is not found in ${SYCL_BINARY_DIR} /../lib, PATH, and LIBRARY_PATH" )
31
38
endif ()
Original file line number Diff line number Diff line change @@ -21,12 +21,13 @@ find_package(CUDA 10.0 REQUIRED)
21
21
get_filename_component (SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY )
22
22
# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
23
23
# the OpenCL include headers 1.2 onward is required. This is used to bypass NVIDIA OpenCL headers
24
- find_path (OPENCL_INCLUDE_DIR CL/cl.h OpenCL/cl.h
25
- HINTS
26
- ${OPENCL_INCLUDE_DIR}
27
- ${SYCL_BINARY_DIR} /../include /sycl/
28
- ${SYCL_BINARY_DIR} /../../include /sycl/
29
- ${SYCL_BINARY_DIR} /../include /
24
+ find_path (OPENCL_INCLUDE_DIR
25
+ NAMES CL/cl.h OpenCL/cl.h
26
+ HINTS
27
+ ${OPENCL_INCLUDE_DIR}
28
+ ${SYCL_BINARY_DIR} /../include /
29
+ ${SYCL_BINARY_DIR} /../../include /
30
+ PATH_SUFFIXES sycl
30
31
)
31
32
# this is work around to avoid duplication half creation in both cuda and SYCL
32
33
add_compile_definitions (CUDA_NO_HALF)
Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ get_filename_component(SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
62
62
if (NOT (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "hipsycl" ))
63
63
# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
64
64
# the OpenCL include headers 1.2 onward is required. This is used to bypass NVIDIA OpenCL headers
65
- find_path (OPENCL_INCLUDE_DIR CL/cl.h OpenCL/cl.h
66
- HINTS
67
- ${OPENCL_INCLUDE_DIR}
68
- ${SYCL_BINARY_DIR} /../include /sycl/
69
- ${SYCL_BINARY_DIR} /../include /
65
+ find_path (OPENCL_INCLUDE_DIR
66
+ NAMES CL/cl.h OpenCL/cl.h
67
+ HINTS
68
+ ${OPENCL_INCLUDE_DIR}
69
+ ${SYCL_BINARY_DIR} /../include /
70
+ ${SYCL_BINARY_DIR} /../../include /
71
+ PATH_SUFFIXES sycl
70
72
)
71
73
endif ()
72
74
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ find_package(CUDA 10.0 REQUIRED)
21
21
get_filename_component (SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY )
22
22
# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
23
23
# the OpenCL include headers 1.2 onward is required. This is used to bypass NVIDIA OpenCL headers
24
- find_path (OPENCL_INCLUDE_DIR CL/cl.h OpenCL/cl.h
25
- HINTS
26
- ${OPENCL_INCLUDE_DIR}
27
- ${SYCL_BINARY_DIR} /../include /sycl/
28
- ${SYCL_BINARY_DIR} /../include /
24
+ find_path (OPENCL_INCLUDE_DIR
25
+ NAMES CL/cl.h OpenCL/cl.h
26
+ HINTS
27
+ ${OPENCL_INCLUDE_DIR}
28
+ ${SYCL_BINARY_DIR} /../include /
29
+ ${SYCL_BINARY_DIR} /../../include /
30
+ PATH_SUFFIXES sycl
29
31
)
30
32
# this is work around to avoid duplication half creation in both cuda and SYCL
31
33
add_compile_definitions (CUDA_NO_HALF)
You can’t perform that action at this time.
0 commit comments