File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
test/conformance/device_code Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ option(UR_BUILD_EXAMPLE_CODEGEN "Build the codegen example." OFF)
48
48
option (VAL_USE_LIBBACKTRACE_BACKTRACE "enable libbacktrace validation backtrace for linux" OFF )
49
49
option (UR_ENABLE_ASSERTIONS "Enable assertions for all build types" OFF )
50
50
set (UR_DPCXX "" CACHE FILEPATH "Path of the DPC++ compiler executable" )
51
+ set (UR_DPCXX_BUILD_FLAGS "" CACHE STRING "Build flags to pass to DPC++ when compiling device programs" )
51
52
set (UR_SYCL_LIBRARY_DIR "" CACHE PATH
52
53
"Path of the SYCL runtime library directory" )
53
54
set (UR_CONFORMANCE_TARGET_TRIPLES "" CACHE STRING
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ List of options provided by CMake:
140
140
| UR_HIP_PLATFORM | Build HIP adapter for AMD or NVIDIA platform | AMD/NVIDIA | AMD |
141
141
| UR_ENABLE_COMGR | Enable comgr lib usage | AMD/NVIDIA | AMD |
142
142
| UR_DPCXX | Path of the DPC++ compiler executable to build CTS device binaries | File path | ` "" ` |
143
+ | UR_DPCXX_BUILD_FLAGS | Build flags to pass to DPC++ when compiling device programs | Space-separated options list | ` "" ` |
143
144
| UR_SYCL_LIBRARY_DIR | Path of the SYCL runtime library directory to build CTS device binaries | Directory path | ` "" ` |
144
145
| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | ` /opt/rocm ` |
145
146
| UR_HIP_INCLUDE_DIR | Path of the ROCm HIP include directory | Directory path | ` ${UR_HIP_ROCM_DIR}/include ` |
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ macro(add_device_binary SOURCE_FILE)
52
52
set (EXTRA_ENV DYLD_FALLBACK_LIBRARY_PATH=${UR_SYCL_LIBRARY_DIR} )
53
53
endif ()
54
54
endif ()
55
+
56
+ # Convert build flags to a regular CMake list, splitting by unquoted white
57
+ # space as necessary.
58
+ separate_arguments (DPCXX_BUILD_FLAGS_LIST NATIVE_COMMAND "${UR_DPCXX_BUILD_FLAGS} " )
59
+
55
60
foreach (TRIPLE ${TARGET_TRIPLES} )
56
61
set (EXE_PATH "${DEVICE_BINARY_DIR} /${KERNEL_NAME} _${TRIPLE} " )
57
62
if (${TRIPLE} MATCHES "amd" )
@@ -79,7 +84,7 @@ macro(add_device_binary SOURCE_FILE)
79
84
add_custom_command (OUTPUT ${EXE_PATH}
80
85
COMMAND ${UR_DPCXX} -fsycl -fsycl-targets=${TRIPLE} -fsycl-device-code-split=off
81
86
${AMD_TARGET_BACKEND} ${AMD_OFFLOAD_ARCH} ${AMD_NOGPULIB}
82
- ${SOURCE_FILE} -o ${EXE_PATH}
87
+ ${DPCXX_BUILD_FLAGS_LIST} ${ SOURCE_FILE} -o ${EXE_PATH}
83
88
84
89
COMMAND ${CMAKE_COMMAND} -E env ${EXTRA_ENV} SYCL_DUMP_IMAGES=true
85
90
${EXE_PATH} || exit 0
You can’t perform that action at this time.
0 commit comments