Skip to content
This repository was archived by the owner on Aug 11, 2023. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 20301e3

Browse files
DBDuncanProGTX
authored andcommittedJan 26, 2022
Update COMPUTECPP_BITCODE to let compiler decide SPIR/SPIR-V by default
Before, COMPUTECPP_BITCODE was set to a default of spir64. As we are aiming for SPIR-V to be the default this need to be changed. COMPUTECPP_BITCODE is now empty by default and when COMPUTECPP_BITCODE is empty, -sycl-target flag will not be used, letting the compiler decide whether to use SPIR or SPIR-V.
1 parent 5185a68 commit 20301e3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎cmake/Modules/FindComputeCpp.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ set(COMPUTECPP_USER_FLAGS "" CACHE STRING "User flags for compute++")
6363
separate_arguments(COMPUTECPP_USER_FLAGS)
6464
mark_as_advanced(COMPUTECPP_USER_FLAGS)
6565

66-
set(COMPUTECPP_BITCODE "spir64" CACHE STRING
66+
set(COMPUTECPP_BITCODE "" CACHE STRING
6767
"Bitcode types to use as SYCL targets in compute++.")
6868
mark_as_advanced(COMPUTECPP_BITCODE)
6969

@@ -185,7 +185,9 @@ endif()
185185
list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -DSYCL_LANGUAGE_VERSION=${SYCL_LANGUAGE_VERSION})
186186

187187
foreach (bitcode IN ITEMS ${COMPUTECPP_BITCODE})
188-
list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -sycl-target ${bitcode})
188+
if(NOT "${bitcode}" STREQUAL "")
189+
list(APPEND COMPUTECPP_DEVICE_COMPILER_FLAGS -sycl-target ${bitcode})
190+
endif()
189191
endforeach()
190192

191193
message(STATUS "compute++ flags - ${COMPUTECPP_DEVICE_COMPILER_FLAGS}")

0 commit comments

Comments
 (0)
This repository has been archived.