Skip to content

Commit ac8f814

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (5 commits)
2 parents 54e6914 + 5304932 commit ac8f814

File tree

8 files changed

+106
-68
lines changed

8 files changed

+106
-68
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3970,6 +3970,10 @@ def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">, Group<f_
39703970
Visibility<[ClangOption, CC1Option]>,
39713971
HelpText<"Maximum number of 'operator->'s to call for a member access">,
39723972
MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">;
3973+
def fsycl_remove_unused_external_funcs : Flag<["-"], "fsycl-remove-unused-external-funcs">,
3974+
Group<sycl_Group>, HelpText<"Allow removal of unused `SYCL_EXTERNAL` functions (default)">;
3975+
def fno_sycl_remove_unused_external_funcs : Flag<["-"], "fno-sycl-remove-unused-external-funcs">,
3976+
Group<sycl_Group>, HelpText<"Prevent removal of unused `SYCL_EXTERNAL` functions">;
39733977

39743978
def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">,
39753979
Visibility<[ClangOption, FlangOption]>,

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10285,10 +10285,13 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA,
1028510285
addArgs(CmdArgs, TCArgs, {"-split=auto"});
1028610286
}
1028710287

10288-
// On FPGA target we don't need non-kernel functions as entry points, because
10289-
// it only increases amount of code for device compiler to handle, without any
10290-
// actual benefits.
10291-
if (T.getArchName() == "spir64_fpga")
10288+
// On Intel targets we don't need non-kernel functions as entry points,
10289+
// because it only increases amount of code for device compiler to handle,
10290+
// without any actual benefits.
10291+
// TODO: Try to extend this feature for non-Intel GPUs.
10292+
if (!TCArgs.hasFlag(options::OPT_fno_sycl_remove_unused_external_funcs,
10293+
options::OPT_fsycl_remove_unused_external_funcs, false) &&
10294+
!T.isNVPTX() && !T.isAMDGPU())
1029210295
addArgs(CmdArgs, TCArgs, {"-emit-only-kernels-as-entry-points"});
1029310296

1029410297
// OPT_fsycl_device_code_split is not checked as it is an alias to

clang/test/Driver/sycl-offload-intelfpga.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@
4141
// RUN: | FileCheck -check-prefix=CHK-NON-KERNEL-ENTRY-POINTS %s
4242
// CHK-NON-KERNEL-ENTRY-POINTS: sycl-post-link{{.*}} "-emit-only-kernels-as-entry-points"
4343

44-
/// Non-FPGA targets should not imply -emit-only-kernels-as-entry-points in sycl-post-link
45-
// RUN: %clang -### -fsycl -fsycl-targets=spir64_fpga,spir64_gen %s 2>&1 \
46-
// RUN: | FileCheck %s --check-prefix=CHK-NON-KERNEL-ENTRY-POINTS-NEG-1
47-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-1: clang{{.*}} "-triple" "spir64_fpga-unknown-unknown"
48-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-1: sycl-post-link{{.*}} "-emit-only-kernels-as-entry-points"
49-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-1: clang{{.*}} "-triple" "spir64_gen-unknown-unknown"
50-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-1: sycl-post-link
51-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-1-NOT: "-emit-only-kernels-as-entry-points"
52-
// RUN: %clang -### -fsycl %s 2>&1 | FileCheck %s --check-prefix=CHK-NON-KERNEL-ENTRY-POINTS-NEG-2
53-
// CHK-NON-KERNEL-ENTRY-POINTS-NEG-2-NOT: "-emit-only-kernels-as-entry-points"
54-
5544
/// -fsycl-disable-range-rounding is applied to all compilations if fpga is used
5645
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga-unknown-unknown,spir64_gen-unknown-unknown %s 2>&1 \
5746
// RUN: | FileCheck -check-prefix=CHK-RANGE-ROUNDING-MULTI %s

clang/test/Driver/sycl-offload.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,11 @@
170170
/// Check if the clang with fsycl adds C++ libraries to the link line
171171
// RUN: %clang -### -target x86_64-unknown-linux-gnu -fsycl %s 2>&1 | FileCheck -check-prefix=CHECK-FSYCL-WITH-CLANG %s
172172
// CHECK-FSYCL-WITH-CLANG: "-lstdc++"
173+
174+
/// Check selective passing of -emit-only-kernels-as-entry-points to sycl-post-link tool
175+
// RUN: %clang -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga %s 2>&1 | FileCheck -check-prefix=CHECK_SYCL_POST_LINK_OPT_PASS %s
176+
// RUN: %clang -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_gen %s 2>&1 | FileCheck -check-prefix=CHECK_SYCL_POST_LINK_OPT_PASS %s
177+
// CHECK_SYCL_POST_LINK_OPT_PASS: sycl-post-link{{.*}}emit-only-kernels-as-entry-points
178+
// RUN: %clang -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_gen -fno-sycl-remove-unused-external-funcs %s 2>&1 | FileCheck -check-prefix=CHECK_SYCL_POST_LINK_OPT_NO_PASS %s
179+
// CHECK_SYCL_POST_LINK_OPT_NO_PASS-NOT: sycl-post-link{{.*}}emit-only-kernels-as-entry-points
180+

sycl/doc/syclcompat/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ themselves with the core SYCL API.
1717
* Clear distinction between core SYCL API and the compatibility interface via
1818
separate namespaces.
1919

20+
## Important Disclaimer
21+
22+
SYCLcompat state is experimental. Its functionalities have been implemented but
23+
are not assured to remain consistent in the future. The API is subject to
24+
potential disruptions with new updates, so exercise caution when using it.
25+
2026
## Notice
2127

2228
Copyright © 2023-2023 Codeplay Software Limited. All rights reserved.

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
5757
include(FetchContent)
5858

5959
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
60-
# commit 69a56ea6d1369a6bde5fce97c85fc7dbda49252f
61-
# Merge: b25bb64d b78f541d
60+
# commit f8fc936d9cf174ad455da84ea3904a8111a590dc
61+
# Merge: 20b9a83e 42104338
6262
# Author: Kenneth Benzie (Benie) <[email protected]>
63-
# Date: Mon Dec 11 12:30:24 2023 +0000
64-
# Merge pull request #1123 from aarongreig/aaron/usmLocationProps
65-
# [OpenCL] Add ur_usm_alloc_location_desc struct and handle it in the CL adapter.
66-
set(UNIFIED_RUNTIME_TAG 69a56ea6d1369a6bde5fce97c85fc7dbda49252f)
63+
# Date: Wed Dec 13 12:06:14 2023 +0000
64+
# Merge pull request #1179 from pbalcer/coverity-issues
65+
# [L0] coverity fixes
66+
set(UNIFIED_RUNTIME_TAG f8fc936d9cf174ad455da84ea3904a8111a590dc)
6767

6868
if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
6969
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")

sycl/test-e2e/Basic/query_emulate_subdevice.cpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)