File tree Expand file tree Collapse file tree 4 files changed +29
-17
lines changed
Expand file tree Collapse file tree 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)
2525if (is_dpcpp)
2626 # Workaround for internal compiler error during linking if -fsycl is used
2727 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+ )
2936 if (NOT SYCL_LIBRARY)
3037 message (FATAL_ERROR "SYCL library is not found in ${SYCL_BINARY_DIR} /../lib, PATH, and LIBRARY_PATH" )
3138 endif ()
Original file line number Diff line number Diff line change @@ -21,12 +21,13 @@ find_package(CUDA 10.0 REQUIRED)
2121get_filename_component (SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY )
2222# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
2323# 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
3031)
3132# this is work around to avoid duplication half creation in both cuda and SYCL
3233add_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)
6262if (NOT (ONEMATH_SYCL_IMPLEMENTATION STREQUAL "hipsycl" ))
6363# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
6464# 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
7072)
7173endif ()
7274
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ find_package(CUDA 10.0 REQUIRED)
2121get_filename_component (SYCL_BINARY_DIR ${CMAKE_CXX_COMPILER} DIRECTORY )
2222# the OpenCL include file from cuda is opencl 1.1 and it is not compatible with DPC++
2323# 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
2931)
3032# this is work around to avoid duplication half creation in both cuda and SYCL
3133add_compile_definitions (CUDA_NO_HALF )
You can’t perform that action at this time.
0 commit comments