Skip to content

Commit 8f70ba3

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
2 parents 49d83d1 + 2978123 commit 8f70ba3

File tree

573 files changed

+11554
-4898
lines changed

Some content is hidden

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

573 files changed

+11554
-4898
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,18 @@ devops/dependencies-igc-dev.json @intel/sycl-matrix-reviewers @intel/dpcpp-esimd
139139
# Benchmarking scripts
140140
devops/scripts/benchmarks/ @intel/llvm-reviewers-benchmarking
141141

142-
# Kernel fusion JIT compiler
143-
sycl-jit/ @intel/dpcpp-kernel-fusion-reviewers
144-
sycl/doc/design/KernelFusionJIT.md @intel/dpcpp-kernel-fusion-reviewers
145-
sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc @intel/dpcpp-kernel-fusion-reviewers
146-
sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp @intel/dpcpp-kernel-fusion-reviewers
147-
sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp @intel/dpcpp-kernel-fusion-reviewers
148-
sycl/source/detail/fusion/ @intel/dpcpp-kernel-fusion-reviewers
149-
sycl/source/detail/jit_compiler.hpp @intel/dpcpp-kernel-fusion-reviewers
150-
sycl/source/detail/jit_compiler.cpp @intel/dpcpp-kernel-fusion-reviewers
151-
sycl/source/detail/jit_device_binaries.hpp @intel/dpcpp-kernel-fusion-reviewers
152-
sycl/source/detail/jit_device_binaries.cpp @intel/dpcpp-kernel-fusion-reviewers
153-
sycl/test-e2e/KernelFusion @intel/dpcpp-kernel-fusion-reviewers
142+
# JIT compiler
143+
sycl-jit/ @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
144+
sycl/doc/design/KernelFusionJIT.md @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
145+
sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
146+
sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
147+
sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
148+
sycl/source/detail/fusion/ @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
149+
sycl/source/detail/jit_compiler.hpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
150+
sycl/source/detail/jit_compiler.cpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
151+
sycl/source/detail/jit_device_binaries.hpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
152+
sycl/source/detail/jit_device_binaries.cpp @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
153+
sycl/test-e2e/KernelFusion @intel/llvm-reviewers-runtime @cperkinsintel @aelovikov-intel
154154

155155
# Matrix
156156
sycl/include/sycl/ext/oneapi/matrix/ @intel/sycl-matrix-reviewers
@@ -178,12 +178,6 @@ sycl/doc/design/CommandGraph.md @intel/sycl-graphs-reviewers
178178
sycl/doc/extensions/**/sycl_ext_oneapi_graph.asciidoc @intel/sycl-graphs-reviewers
179179
sycl/doc/syclgraph/ @intel/sycl-graphs-reviewers
180180

181-
# syclcompat library
182-
sycl/**/syclcompat/ @intel/syclcompat-lib-reviewers
183-
sycl/cmake/modules/AddSYCLLibraryUnitTest.cmake @intel/syclcompat-lib-reviewers
184-
sycl/include/syclcompat.hpp @intel/syclcompat-lib-reviewers
185-
sycl/test-e2e/syclcompat/ @intel/syclcompat-lib-reviewers
186-
187181
# bindless images
188182
sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @intel/bindless-images-reviewers
189183
sycl/include/sycl/ext/oneapi/bindless* @intel/bindless-images-reviewers

.github/workflows/sycl-docs.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,24 @@ on:
1010
- '.github/workflows/sycl-docs.yml'
1111
- 'clang/docs/**'
1212
- 'sycl/doc/**'
13+
- 'devops/benchmarks/scripts/html/**'
1314
push:
1415
branches:
1516
- sycl
1617
paths:
1718
- '.github/workflows/sycl-docs.yml'
1819
- 'clang/docs/**'
1920
- 'sycl/doc/**'
21+
- 'devops/benchmarks/scripts/html/**'
22+
workflow_dispatch:
23+
inputs:
24+
update_gh_pages:
25+
type: choice
26+
description: Update Github Pages
27+
options:
28+
- true
29+
- false
30+
default: true
2031

2132
permissions:
2233
contents: read
@@ -62,5 +73,5 @@ jobs:
6273
with:
6374
path: ./install_docs
6475
- name: Deploy to GitHub Pages
65-
if: ${{ github.event_name == 'push' }}
76+
if: ${{ github.event_name == 'push' || inputs.update_gh_pages == 'true' }}
6677
uses: actions/deploy-pages@v4

.github/workflows/sycl-linux-precommit.yml

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,42 @@ jobs:
6262
e2e_binaries_artifact: e2e_bin
6363
e2e_binaries_preview_artifact: e2e_bin_preview
6464

65+
# Build and run native cpu e2e tests separately as cannot currently
66+
# build all the e2e tests
67+
build_run_native_cpu_e2e_tests:
68+
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
69+
runs-on: [Linux, build]
70+
needs: [build]
71+
container:
72+
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
73+
options: -u 1001:1001
74+
steps:
75+
- uses: actions/checkout@v4
76+
with:
77+
sparse-checkout: |
78+
devops/
79+
80+
# download build artefact
81+
- name: Download toolchain
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: sycl_linux_default
85+
- name: Extract SYCL toolchain
86+
shell: bash
87+
run: |
88+
mkdir toolchain
89+
tar -xf llvm_sycl.tar.zst -C toolchain
90+
rm llvm_sycl.tar.zst
91+
- name: Build and run E2E tests
92+
uses: ./devops/actions/run-tests/e2e
93+
with:
94+
ref: ${{ inputs.ref || github.sha }}
95+
testing_mode: full
96+
target_devices: native_cpu:cpu
97+
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
98+
extra_lit_opts: --param sycl_build_targets="native_cpu"
99+
extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON
100+
65101
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
66102
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
67103
# has CUDA 12.6.1 installed.
@@ -100,14 +136,14 @@ jobs:
100136
echo FILTER_6_2="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT
101137
echo FILTER_6_3="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_3 | paste -sd '|')" >> $GITHUB_OUTPUT
102138
103-
run_prebuilt_e2e_tests:
139+
E2E:
104140
needs: [build, detect_changes, compat_read_exclude]
105141
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
106142
strategy:
107143
fail-fast: false
108144
matrix:
109145
include:
110-
- name: GEN 12 Integrated
146+
- name: Intel / GEN 12 Integrated
111147
runner: '["Linux", "gen12"]'
112148
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
113149
- name: NVIDIA/CUDA
@@ -119,39 +155,39 @@ jobs:
119155
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
120156
target_devices: hip:gpu
121157
extra_lit_opts: -j 1
122-
- name: Intel Arc A-Series Graphics
158+
- name: Intel / Arc A-Series Graphics
123159
runner: '["Linux", "arc"]'
124160
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
125-
- name: Dev IGC / Intel Arc A-Series Graphics
161+
- name: Intel Dev IGC / Arc A-Series Graphics
126162
runner: '["Linux", "arc"]'
127163
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
128164
target_devices: level_zero:gpu
129165
use_igc_dev: true
130166
env: '{"LIT_FILTER":"Matrix/"}'
131-
- name: Intel Ponte Vecchio GPU
167+
- name: Intel / Ponte Vecchio GPU
132168
runner: '["Linux", "pvc"]'
133169
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
134-
- name: Dev IGC / Intel Ponte Vecchio GPU
170+
- name: Intel Dev IGC / Ponte Vecchio GPU
135171
runner: '["Linux", "pvc"]'
136172
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
137173
target_devices: level_zero:gpu
138174
use_igc_dev: true
139175
env: '{"LIT_FILTER":"Matrix/"}'
140-
- name: Intel Battlemage Graphics
176+
- name: Intel / Battlemage Graphics
141177
runner: '["Linux", "bmg"]'
142178
target_devices: level_zero_v1:gpu;level_zero_v2:gpu
143179
- name: Preview Mode
144180
runner: '["Linux", "gen12"]'
145181
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
146182
extra_lit_opts: --param test-preview-mode=True
147183
e2e_binaries_artifact: e2e_bin_preview
148-
- name: ABI compatibility against sycl-rel-6_2
184+
- name: ABI compatibility / sycl-rel-6_2
149185
runner: '["Linux", "pvc"]'
150186
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2
151187
target_devices: level_zero:gpu
152188
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_2 }}"'
153189
e2e_binaries_artifact: 'in-container'
154-
- name: ABI compatibility against sycl-rel-6_3
190+
- name: ABI compatibility / sycl-rel-6_3
155191
runner: '["Linux", "pvc"]'
156192
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_3
157193
target_devices: level_zero:gpu

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
- name: Reset Intel GPU
236236
uses: ./devops/actions/reset_gpu
237237
- name: Install drivers
238-
if: inputs.install_igc_driver == 'true' || inputs.install_dev_igc_driver == 'true'
238+
if: inputs.e2e_binaries_artifact != 'in-container' && (inputs.install_igc_driver == 'true' || inputs.install_dev_igc_driver == 'true')
239239
env:
240240
GITHUB_TOKEN: ${{ github.token }}
241241
run: |

.github/workflows/sycl-nightly.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,23 @@ jobs:
201201
always()
202202
&& !cancelled()
203203
&& needs.build-win.outputs.build_conclusion == 'success'
204+
strategy:
205+
fail-fast: false
206+
matrix:
207+
include:
208+
- name: Intel L0 Gen12 GPU
209+
runner: '["Windows", "gen12"]'
210+
target_devices: level_zero:gpu
211+
212+
- name: Intel L0 Battlemage GPU
213+
runner: '["Windows", "bmg"]'
214+
target_devices: level_zero:gpu
215+
204216
uses: ./.github/workflows/sycl-windows-run-tests.yml
205217
with:
206-
name: Intel GEN12 Graphics with Level Zero
207-
runner: '["Windows","gen12"]'
208-
target_devices: level_zero:gpu
218+
name: ${{ matrix.name }}
219+
runner: ${{ matrix.runner }}
220+
target_devices: ${{ matrix.target_devices }}
209221
toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }}
210222

211223
cuda-aws-start:
@@ -320,20 +332,30 @@ jobs:
320332
toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }}
321333
sycl_cts_artifact: sycl_cts_bin_win
322334

335+
# Verification example:
336+
# cosign-windows-amd64.exe verify-blob sycl_linux.tar.gz \
337+
# --bundle sycl_linux.tar.gz.sigstore.json \
338+
# --certificate-oidc-issuer https://token.actions.githubusercontent.com \
339+
# --certificate-identity https://github.com/intel/llvm/.github/workflows/sycl-nightly.yml@refs/heads/sycl
323340
nightly_build_upload:
324341
name: Nightly Build Upload
325342
if: ${{ github.ref_name == 'sycl' }}
326343
needs: [ubuntu2204_build, build-win]
327344
runs-on: ubuntu-latest
328345
permissions:
329346
contents: write
347+
id-token: write
330348
steps:
331349
- uses: actions/download-artifact@v4
332350
with:
333351
name: sycl_linux_default
334352
- uses: actions/download-artifact@v4
335353
with:
336354
name: sycl_windows_default
355+
- name: Sign with sigstore/cosign
356+
uses: sigstore/[email protected]
357+
with:
358+
inputs: sycl_linux.tar.gz sycl_windows.tar.gz
337359
- name: Compute tag
338360
id: tag
339361
run: |
@@ -349,6 +371,8 @@ jobs:
349371
files: |
350372
sycl_linux.tar.gz
351373
sycl_windows.tar.gz
374+
sycl_linux.tar.gz.sigstore.json
375+
sycl_windows.tar.gz.sigstore.json
352376
tag_name: nightly-${{ steps.tag.outputs.TAG }}
353377
name: DPC++ daily ${{ steps.tag.outputs.TAG }}
354378
prerelease: true

clang/include/clang/Sema/Sema.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9184,7 +9184,13 @@ class Sema final : public SemaBase {
91849184
};
91859185

91869186
/// Compute the mangling number context for a lambda expression or
9187-
/// block literal. Also return the extra mangling decl if any.
9187+
/// block literal that appears in the specified declaration context in
9188+
/// consideration of the current expression evaluation and template
9189+
/// instantiation contexts. If the mangling context requires external linkage,
9190+
/// then a mangling number context is returned in the first tuple
9191+
/// element. If the mangling context is non-normal (specialized for
9192+
/// lambda and block types relative to other entities), the overriding
9193+
/// declaration is returned in the second tuple element.
91889194
///
91899195
/// \param DC - The DeclContext containing the lambda expression or
91909196
/// block literal.

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13483,6 +13483,7 @@ MangleNumberingContext &
1348313483
ASTContext::getManglingNumberContext(const DeclContext *DC) {
1348413484
assert(LangOpts.CPlusPlus); // We don't need mangling numbers for plain C.
1348513485
std::unique_ptr<MangleNumberingContext> &MCtx = MangleNumberingContexts[DC];
13486+
DC = DC->getPrimaryContext();
1348613487
if (!MCtx)
1348713488
MCtx = createMangleNumberingContext();
1348813489
return *MCtx;

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
10931093
ThinOrFullLTOPhase) {
10941094
MPM.addPass(createModuleToFunctionPassAdaptor(
10951095
InferAddressSpacesPass(clang::targets::SPIR_GENERIC_AS)));
1096-
MPM.addPass(
1097-
createModuleToFunctionPassAdaptor(SYCLOptimizeBarriersPass()));
1096+
if (Level != OptimizationLevel::O0)
1097+
MPM.addPass(createModuleToFunctionPassAdaptor(
1098+
SYCLOptimizeBarriersPass()));
10981099
});
10991100
}
11001101

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10066,8 +10066,13 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1006610066
// clang-offload-wrapper
1006710067
// -o=<outputfile>.bc
1006810068
// -host=x86_64-pc-linux-gnu -kind=sycl
10069+
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
1006910070
// -format=spirv <inputfile1>.spv <manifest1>(optional)
1007010071
// -format=spirv <inputfile2>.spv <manifest2>(optional)
10072+
#else
10073+
// -format=spirv <inputfile1>.spv
10074+
// -format=spirv <inputfile2>.spv
10075+
#endif
1007110076
// ...
1007210077
ArgStringList WrapperArgs;
1007310078

@@ -10132,6 +10137,12 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1013210137
WrapperArgs.push_back(
1013310138
C.getArgs().MakeArgString(Twine("-kind=") + Twine(Kind)));
1013410139

10140+
// Enable preview breaking changes in clang-offload-wrapper,
10141+
// in case it needs to introduce any ABI breaking changes.
10142+
// For example, changes in offload binary descriptor format.
10143+
if (C.getArgs().hasArg(options::OPT_fpreview_breaking_changes))
10144+
WrapperArgs.push_back("-fpreview-breaking-changes");
10145+
1013510146
assert((Inputs.size() > 0) && "no inputs for clang-offload-wrapper");
1013610147
assert(((Inputs[0].getType() != types::TY_Tempfiletable) ||
1013710148
(Inputs.size() == 1)) &&
@@ -11362,6 +11373,23 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1136211373
CmdArgs.push_back(
1136311374
Args.MakeArgString("--sycl-post-link-options=" + PostLinkOptString));
1136411375

11376+
if (Args.hasArg(options::OPT_fsycl_remove_unused_external_funcs))
11377+
CmdArgs.push_back(
11378+
Args.MakeArgString("-sycl-remove-unused-external-funcs"));
11379+
if (Args.hasArg(options::OPT_fno_sycl_remove_unused_external_funcs))
11380+
CmdArgs.push_back(
11381+
Args.MakeArgString("-no-sycl-remove-unused-external-funcs"));
11382+
if (Args.hasArg(options::OPT_fsycl_device_code_split_esimd))
11383+
CmdArgs.push_back(Args.MakeArgString("-sycl-device-code-split-esimd"));
11384+
if (Args.hasArg(options::OPT_fno_sycl_device_code_split_esimd))
11385+
CmdArgs.push_back(Args.MakeArgString("-no-sycl-device-code-split-esimd"));
11386+
if (Args.hasArg(options::OPT_fsycl_add_default_spec_consts_image))
11387+
CmdArgs.push_back(
11388+
Args.MakeArgString("-sycl-add-default-spec-consts-image"));
11389+
if (Args.hasArg(options::OPT_fno_sycl_add_default_spec_consts_image))
11390+
CmdArgs.push_back(
11391+
Args.MakeArgString("-no-sycl-add-default-spec-consts-image"));
11392+
1136511393
// --llvm-spirv-options="options" provides a string of options to be passed
1136611394
// along to the llvm-spirv (translation) step during device link.
1136711395
SmallString<128> OptString;
@@ -11538,6 +11566,12 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA,
1153811566
Args.MakeArgString("--wrapper-jobs=" + Twine(NumThreads)));
1153911567
}
1154011568

11569+
// Enable preview breaking changes in clang-linker-wrapper,
11570+
// in case it needs to introduce any ABI breaking changes.
11571+
// For example, changes in offload binary descriptor format.
11572+
if (Args.hasArg(options::OPT_fpreview_breaking_changes))
11573+
CmdArgs.push_back("-fpreview-breaking-changes");
11574+
1154111575
const char *Exec =
1154211576
Args.MakeArgString(getToolChain().GetProgramPath("clang-linker-wrapper"));
1154311577

clang/lib/Sema/SemaLambda.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,14 @@ Sema::getCurrentMangleNumberContext(const DeclContext *DC) {
356356
return std::make_tuple(&Context.getManglingNumberContext(DC), nullptr);
357357
}
358358

359-
return std::make_tuple(nullptr, nullptr);
359+
if (ManglingContextDecl) {
360+
// Lambdas defined in the initializer of a local variable are mangled
361+
// in the enclosing function context.
362+
if (auto *VD = dyn_cast<VarDecl>(ManglingContextDecl);
363+
VD && !VD->hasGlobalStorage())
364+
ManglingContextDecl = nullptr;
365+
}
366+
return std::make_tuple(nullptr, ManglingContextDecl);
360367
}
361368

362369
case NonInlineInModulePurview:

0 commit comments

Comments
 (0)