You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][HIP] Add CMake cache variables to allow build of DPC++ toolchain with non-standard ROCm installation (#8791)
Fix#8790
Re-adds CMake cache variables `SYCL_BUILD_PI_HIP_INCLUDE_DIR` and
`SYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR`.
Also adds CMake cache variable `SYCL_BUILD_PI_HIP_LIB_DIR`.
Added checks for above variables.
The changes maintain the current simplified behavior from #6406 while
allowing for the user to override paths if necessary.
# N.B. Doesn't check if all override options are set: HSA and HIP include (and HIP lib for AMD platform)
39
+
if(("${SYCL_BUILD_PI_HIP_INCLUDE_DIR}"STREQUAL"") OR
40
+
("${SYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR}"STREQUAL"") OR
41
+
(("${SYCL_BUILD_PI_HIP_LIB_DIR}"STREQUAL"") AND ("${SYCL_BUILD_PI_HIP_PLATFORM}"STREQUAL"AMD")))
42
+
43
+
if(NOTEXISTS"${SYCL_BUILD_PI_HIP_ROCM_DIR}")
44
+
message(FATAL_ERROR"Couldn't find ROCm installation in '${SYCL_BUILD_PI_HIP_ROCM_DIR}',"
45
+
" please set SYCL_BUILD_PI_HIP_ROCM_DIR to the path of the ROCm installation.")
46
+
endif()
47
+
endif()
48
+
49
+
# Check if HIP include path exists
50
+
if(NOTEXISTS"${PI_HIP_INCLUDE_DIR}")
51
+
if("${SYCL_BUILD_PI_HIP_INCLUDE_DIR}"STREQUAL"")
52
+
message(FATAL_ERROR"Couldn't find the HIP include directory at '${PI_HIP_INCLUDE_DIR}',"
53
+
" please check ROCm installation and possibly set SYCL_BUILD_PI_HIP_INCLUDE_DIR to the path of the HIP include directory for non-standard install paths.")
54
+
else()
55
+
message(FATAL_ERROR"Couldn't find the HIP include directory at '${PI_HIP_INCLUDE_DIR}',"
56
+
" please set SYCL_BUILD_PI_HIP_INCLUDE_DIR to the path of the HIP include directory from the ROCm installation.")
message(FATAL_ERROR"Couldn't find the HSA include directory at '${PI_HIP_HSA_INCLUDE_DIR}',"
64
+
" please check ROCm installation and possibly set SYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR to the path of the HSA include directory for non-standard install paths.")
65
+
else()
66
+
message(FATAL_ERROR"Couldn't find the HSA include directory at '${PI_HIP_HSA_INCLUDE_DIR}',"
67
+
" please set SYCL_BUILD_PI_HIP_HSA_INCLUDE_DIR to the path of the HSA include directory from the ROCm installation.")
68
+
endif()
69
+
endif()
70
+
71
+
# Check if HIP library path exists (AMD platform only)
72
+
if("${SYCL_BUILD_PI_HIP_PLATFORM}"STREQUAL"AMD")
73
+
if(NOTEXISTS"${PI_HIP_LIB_DIR}")
74
+
if("${SYCL_BUILD_PI_HIP_LIB_DIR}"STREQUAL"")
75
+
message(FATAL_ERROR"Couldn't find the HIP library directory at '${PI_HIP_LIB_DIR}',"
76
+
" please check ROCm installation and possibly set SYCL_BUILD_PI_HIP_LIB_DIR to the path of the HIP library directory for non-standard install paths.")
77
+
else()
78
+
message(FATAL_ERROR"Couldn't find the HIP library directory at '${PI_HIP_LIB_DIR}',"
79
+
" please set SYCL_BUILD_PI_HIP_LIB_DIR to the path of the HIP library directory from the ROCm installation.")
0 commit comments