Skip to content

Commit 20b6d34

Browse files
committed
Revert "[SYCL-PTX] Libclc binding for SYCL device (#1914)"
This reverts commit 761b2ea.
1 parent 07eaf09 commit 20b6d34

File tree

4 files changed

+2
-3674
lines changed

4 files changed

+2
-3674
lines changed

libclc/CMakeLists.txt

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
255255
LIB_DIR lib
256256
DIRS ${dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
257257
DEPS convert-clc.cl )
258-
set( libspirv_files_base )
259-
libclc_configure_lib_source(libspirv_files_base
258+
set( libspirv_files )
259+
libclc_configure_lib_source(libspirv_files
260260
LIB_DIR libspirv
261261
DIRS ${dirs} ${DARCH} ${DARCH}-${OS} ${DARCH}-${VENDOR}-${OS}
262262
DEPS convert-spirv.cl convert-core.cl)
@@ -320,17 +320,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
320320
endif()
321321
message( " DEVICE: ${d} ( ${${d}_aliases} )" )
322322

323-
# FIXME: this is a hack, remove once we can use sycldevice in the triple
324-
# without changing the language
325-
# see issue: https://github.com/intel/llvm/issues/1814
326-
set(libspirv_files ${libspirv_files_base})
327-
if( ${ARCH} STREQUAL nvptx OR ${ARCH} STREQUAL nvptx64 )
328-
add_libclc_sycl_binding(libspirv_files
329-
TRIPLE ${t}
330-
COMPILE_OPT ${flags}
331-
FILES generic/libspirv/sycldevice-binding.cpp)
332-
endif()
333-
334323
if ( ${ARCH} STREQUAL "spirv" OR ${ARCH} STREQUAL "spirv64" )
335324
if( ${ARCH} STREQUAL "spirv" )
336325
set( t "spir--" )

libclc/cmake/modules/AddLibclc.cmake

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -179,58 +179,3 @@ function(libclc_configure_lib_source OUT_LIST)
179179
set( ${OUT_LIST} ${rel_files} PARENT_SCOPE )
180180

181181
endfunction(libclc_configure_lib_source OUT_LIST)
182-
183-
# add_libclc_sycl_binding(arch_suffix
184-
# TRIPLE string
185-
# Triple used to compile
186-
# FILES string ...
187-
# List of file that should be built for this library
188-
# COMPILE_OPT
189-
# Compilation options
190-
# )
191-
#
192-
# Build the sycl binding file for SYCLDEVICE.
193-
# The path to the generated object file are appended in OUT_LIST.
194-
#
195-
# The mangling for sycl device is not yet fully
196-
# compatible with standard mangling.
197-
# For various reason, we need a mangling specific
198-
# for the Default address space (mapping to generic in SYCL).
199-
# The Default address space is not accessible in CL mode,
200-
# so we build this file in sycl mode for mangling purposes.
201-
#
202-
# FIXME: all the files should be compiled with the sycldevice triple
203-
# but this is not possible at the moment as this will trigger
204-
# the SYCL mode which we don't want.
205-
#
206-
function(add_libclc_sycl_binding OUT_LIST)
207-
cmake_parse_arguments(ARG
208-
""
209-
"TRIPLE"
210-
"FILES;COMPILE_OPT"
211-
${ARGN})
212-
213-
foreach( file ${ARG_FILES} )
214-
file( TO_CMAKE_PATH ${LIBCLC_ROOT_DIR}/${file} SYCLDEVICE_BINDING )
215-
if( EXISTS ${SYCLDEVICE_BINDING} )
216-
set( SYCLDEVICE_BINDING_OUT ${CMAKE_CURRENT_BINARY_DIR}/sycldevice-binding-${ARG_TRIPLE}/sycldevice-binding.bc )
217-
string( REGEX REPLACE "SHELL:" "" SYLCDEVICE_OPT ${ARG_COMPILE_OPT} )
218-
add_custom_command( OUTPUT ${SYCLDEVICE_BINDING_OUT}
219-
COMMAND ${CMAKE_COMMAND} -E make_directory
220-
${CMAKE_CURRENT_BINARY_DIR}/sycldevice-binding-${ARG_TRIPLE}
221-
COMMAND ${LLVM_CLANG}
222-
-fsycl-targets=${ARG_TRIPLE}-sycldevice
223-
-fsycl
224-
-fsycl-device-only
225-
-Dcl_khr_fp64
226-
-I${LIBCLC_ROOT_DIR}/generic/include
227-
${SYCLDEVICE_OPT}
228-
${SYCLDEVICE_BINDING}
229-
-o ${SYCLDEVICE_BINDING_OUT}
230-
MAIN_DEPENDENCY ${SYCLDEVICE_BINDING}
231-
DEPENDS ${SYCLDEVICE_BINDING} ${LLVM_CLANG}
232-
VERBATIM )
233-
set( ${OUT_LIST} "${${OUT_LIST}};${SYCLDEVICE_BINDING_OUT}" PARENT_SCOPE )
234-
endif()
235-
endforeach()
236-
endfunction(add_libclc_sycl_binding OUT_LIST)

libclc/generic/include/lp64_types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ typedef _Float16 __clc_vec16_float16_t __attribute__((ext_vector_type(16)));
122122
#endif
123123
typedef __clc_int64_t __clc_size_t;
124124

125-
#ifdef __SYCL_DEVICE_ONLY__
126-
typedef __ocl_event_t __clc_event_t;
127-
#else
128125
typedef event_t __clc_event_t;
129-
#endif
130126

131127
#endif // CLC_LP64_TYPES

0 commit comments

Comments
 (0)