Skip to content

Commit c13e577

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into host_prof_pr
2 parents 61cadcf + 1eb75c7 commit c13e577

File tree

65 files changed

+826
-1610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+826
-1610
lines changed

clang/test/Driver/sycl-post-link-options.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
// RUN: --sycl-post-link-options="-O2 -device-globals -O0" \
2222
// RUN: --linker-path=/usr/bin/ld %t.o -o a.out 2>&1 | FileCheck --check-prefix OPTIONS_POSTLINK_JIT_NEW %s
2323
// OPTIONS_POSTLINK_JIT_NEW: sycl-post-link{{.*}} -spec-const=native -properties -split=auto -emit-only-kernels-as-entry-points -emit-param-info -symbols -emit-exported-symbols -emit-imported-symbols -split-esimd -lower-esimd -O2 -device-globals -O0
24+
//
25+
// Run clang-linker-wrapper test for generating SYCLBIN files.
26+
//
27+
// RUN: clang-linker-wrapper --dry-run --host-triple=x86_64-unknown-linux-gnu \
28+
// RUN: -syclbin=executable -sycl-device-libraries=%t.devicelib.o \
29+
// RUN: --sycl-post-link-options="-O2 -device-globals -O0" \
30+
// RUN: --linker-path=/usr/bin/ld %t.o -o a.out 2>&1 | FileCheck --check-prefix OPTIONS_POSTLINK_JIT_NEW_SYCLBIN %s
31+
// OPTIONS_POSTLINK_JIT_NEW_SYCLBIN: sycl-post-link{{.*}} -spec-const=native -properties -split=auto -emit-only-kernels-as-entry-points -emit-param-info -symbols -emit-kernel-names -emit-exported-symbols -emit-imported-symbols -split-esimd -lower-esimd -O2 -device-globals -O0

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,9 @@ getTripleBasedSYCLPostLinkOpts(const ArgList &Args,
694694
OPT_no_sycl_device_code_split_esimd, SplitEsimdByDefault);
695695
if (!Args.hasArg(OPT_sycl_thin_lto))
696696
PostLinkArgs.push_back("-symbols");
697+
// Emit kernel names if we are producing SYCLBIN.
698+
if (Args.hasArg(OPT_syclbin_EQ))
699+
PostLinkArgs.push_back("-emit-kernel-names");
697700
// Specialization constant info generation is mandatory -
698701
// add options unconditionally
699702
PostLinkArgs.push_back("-emit-exported-symbols");

libclc/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -489,17 +489,12 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
489489
set( MACRO_ARCH ${ARCH} )
490490
endif()
491491

492-
# Enable SPIR-V builtin function declarations, so they don't
493-
# have to be explicity declared in the soruce.
494-
list( APPEND build_flags -Xclang -fdeclare-spirv-builtins)
495492
set( LIBCLC_ARCH_OBJFILE_DIR "${LIBCLC_OBJFILE_DIR}/${arch_suffix}" )
496493
file( MAKE_DIRECTORY ${LIBCLC_ARCH_OBJFILE_DIR} )
497494

498495
# OpenCL 3.0 extensions
499496
string(CONCAT CL_3_0_EXTENSIONS
500497
"-cl-ext="
501-
"+cl_khr_fp64,"
502-
"+cl_khr_fp16,"
503498
"+__opencl_c_3d_image_writes,"
504499
"+__opencl_c_images,"
505500
"+cl_khr_3d_image_writes")
@@ -573,10 +568,11 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
573568
if( BUILD_LIBSPIRV_${t} )
574569
set( spirv_build_flags ${build_flags} )
575570
list( APPEND spirv_build_flags
571+
# Enable SPIR-V builtin function declarations, so they don't have to be
572+
# explicity declared in the soruce.
573+
-Xclang -fdeclare-spirv-builtins
576574
-I${CMAKE_CURRENT_SOURCE_DIR}/opencl/include
577575
-I${CMAKE_CURRENT_SOURCE_DIR}/libspirv/include/
578-
# FIXME: Fix libspirv to not require disabling this noisy warning
579-
-Wno-bitwise-conditional-parentheses
580576
)
581577

582578
add_libclc_builtin_set(

libclc/libspirv/lib/generic/SOURCES

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ math/cbrt.cl
6767
math/ceil.cl
6868
math/clc_exp10.cl
6969
math/clc_fmod.cl
70-
math/clc_pow.cl
71-
math/clc_pown.cl
72-
math/clc_powr.cl
7370
math/clc_remainder.cl
7471
math/clc_remquo.cl
7572
math/clc_rootn.cl

0 commit comments

Comments
 (0)