Skip to content

Commit f4308ef

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into upd-is-comp
2 parents 824f130 + 64c60c5 commit f4308ef

File tree

265 files changed

+8935
-6225
lines changed

Some content is hidden

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

265 files changed

+8935
-6225
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
3636

3737
# Unified Runtime
3838
unified-runtime/ @intel/unified-runtime-reviewers
39-
# TODO: Use specific UR Level Zero adapter team
40-
unified-runtime/*/adapters/level_zero/ @intel/unified-runtime-reviewers
41-
# TODO: Use specific UR OpenCL adapter team
42-
unified-runtime/*/adapters/opencl/ @intel/unified-runtime-reviewers
39+
unified-runtime/*/adapters/level_zero/ @intel/unified-runtime-reviewers-level-zero
40+
unified-runtime/*/adapters/opencl/ @intel/unified-runtime-reviewers-opencl
4341
unified-runtime/*/adapters/cuda/ @intel/llvm-reviewers-cuda
4442
unified-runtime/*/adapters/hip/ @intel/llvm-reviewers-cuda
4543
unified-runtime/*/adapters/native_cpu/ @intel/dpcpp-nativecpu-reviewers
@@ -75,6 +73,7 @@ llvm/include/llvm/SYCLLowerIR/SYCLCreateNVVMAnnotations.h @intel/llvm-reviewers-
7573
llvm/lib/SYCLLowerIR/SYCLCreateNVVMAnnotations.cpp @intel/llvm-reviewers-cuda
7674
llvm/lib/Target/NVPTX @intel/llvm-reviewers-cuda
7775
llvm/lib/Target/AMDGPU @intel/llvm-reviewers-cuda
76+
unified-runtime/source/common/cuda-hip @intel/llvm-reviewers-cuda
7877

7978
# XPTI instrumentation utilities
8079
xpti/ @intel/llvm-reviewers-runtime

.github/workflows/sycl-detect-changes.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ jobs:
8282
ur:
8383
- 'unified-runtime/**'
8484
- .github/workflows/ur-*
85+
ur_cuda_adapter:
86+
- 'unified-runtime/source/adapters/cuda/**'
8587
8688
- name: Set output
8789
id: result
@@ -92,7 +94,7 @@ jobs:
9294
return '${{ steps.changes.outputs.changes }}';
9395
}
9496
// Treat everything as changed for huge PRs.
95-
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "esimd", "ur"];
97+
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "esimd", "ur", "ur_cuda_adapter"];
9698
9799
- run: echo '${{ steps.result.outputs.result }}'
98100

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

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ on:
4646
default: 3
4747
e2e_binaries_artifact:
4848
type: string
49-
required: False
49+
required: false
50+
pack_release:
51+
type: string
52+
required: false
5053

5154
outputs:
5255
build_conclusion:
@@ -100,6 +103,10 @@ on:
100103
options:
101104
- 3
102105

106+
pack_release:
107+
type: string
108+
required: false
109+
103110
permissions: read-all
104111

105112
jobs:
@@ -215,11 +222,26 @@ jobs:
215222
# TODO consider moving this to Dockerfile.
216223
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
217224
LIT_OPTS="--allow-empty-runs" LIT_FILTER="e2e_test_requirements" cmake --build $GITHUB_WORKSPACE/build --target check-sycl
218-
- name: Install
225+
- name: Install sycl-toolchain
219226
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
220-
# TODO replace utility installation with a single CMake target
221227
run: |
222228
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain
229+
230+
- name: Pack toolchain release
231+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
232+
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
233+
- name: Upload toolchain release
234+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
235+
uses: actions/upload-artifact@v4
236+
with:
237+
name: sycl_linux_release
238+
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
239+
retention-days: ${{ inputs.retention-days }}
240+
241+
- name: Install utilities
242+
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
243+
# TODO replace utility installation with a single CMake target
244+
run: |
223245
cmake --build $GITHUB_WORKSPACE/build --target utils/FileCheck/install
224246
cmake --build $GITHUB_WORKSPACE/build --target utils/count/install
225247
cmake --build $GITHUB_WORKSPACE/build --target utils/not/install

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ on:
2222
- '.github/workflows/sycl-macos-*.yml'
2323
- '.github/workflows/sycl-nightly.yml'
2424
- '.github/workflows/sycl-rel-nightly.yml'
25+
- '.github/workflows/trivy.yml'
2526
- 'devops/containers/**'
2627
- 'devops/actions/build_container/**'
28+
- 'unified-runtime/examples/**'
29+
- 'unified-runtime/scripts/**'
30+
- 'unified-runtime/test/**'
31+
- 'unified-runtime/third_party/**'
32+
- 'unified-runtime/tools/**'
2733

2834
concurrency:
2935
# Cancel a currently running workflow from the same PR, branch or tag.
@@ -52,6 +58,22 @@ jobs:
5258
changes: ${{ needs.detect_changes.outputs.filters }}
5359
e2e_binaries_artifact: sycl_e2e_bin_default
5460

61+
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
62+
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
63+
# has CUDA 12.6.1 installed.
64+
# The idea is to ensure that the code works with both CUDA versions.
65+
build_ubuntu2204:
66+
needs: [detect_changes]
67+
if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter')
68+
uses: ./.github/workflows/sycl-linux-build.yml
69+
with:
70+
build_ref: ${{ github.sha }}
71+
build_cache_root: "/__w/"
72+
build_artifact_suffix: "default"
73+
build_cache_suffix: "default"
74+
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
75+
changes: ${{ needs.detect_changes.outputs.filters }}
76+
5577
run_prebuilt_e2e_tests:
5678
needs: [build, detect_changes]
5779
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}

.github/workflows/sycl-rel-nightly.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,34 +63,35 @@ jobs:
6363
runner: '["Linux", "amdgpu"]'
6464
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
6565
target_devices: hip:gpu
66-
tests_selector: e2e
6766

68-
- name: Intel L0 GPU
67+
- name: Intel L0 Gen12 GPU
6968
runner: '["Linux", "gen12"]'
7069
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
7170
target_devices: level_zero:gpu
72-
tests_selector: e2e
7371
extra_lit_opts: --param gpu-intel-gen12=True
7472

75-
- name: Intel OCL GPU
73+
- name: Intel L0 Battlemage GPU
74+
runner: '["Linux", "bmg"]'
75+
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
76+
target_devices: level_zero:gpu
77+
78+
- name: Intel OCL Gen12 GPU
7679
runner: '["Linux", "gen12"]'
7780
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
7881
target_devices: opencl:gpu
79-
tests_selector: e2e
8082
extra_lit_opts: --param gpu-intel-gen12=True
8183

8284
- name: Intel OCL CPU
8385
runner: '["Linux", "gen12"]'
8486
image_options: -u 1001 --privileged --cap-add SYS_ADMIN
8587
target_devices: opencl:cpu
86-
tests_selector: e2e
8788
uses: ./.github/workflows/sycl-linux-run-tests.yml
8889
with:
8990
name: ${{ matrix.name }}
9091
runner: ${{ matrix.runner }}
9192
image_options: ${{ matrix.image_options }}
9293
target_devices: ${{ matrix.target_devices }}
93-
tests_selector: ${{ matrix.tests_selector }}
94+
tests_selector: e2e
9495
extra_lit_opts: ${{ matrix.extra_lit_opts }}
9596
repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }}
9697
devops_ref: sycl
@@ -117,12 +118,22 @@ jobs:
117118
always()
118119
&& !cancelled()
119120
&& needs.build-win.outputs.build_conclusion == 'success'
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
include:
125+
- name: Intel GEN12 Graphics with Level Zero
126+
runner: '["Windows","gen12"]'
127+
# 6_1_0 doesn't support the auto-detection, keep it until 6_2_0.
128+
extra_lit_opts: --param gpu-intel-gen12=True
129+
- name: Intel Battlemage Graphics with Level Zero
130+
runner: '["Windows","bmg"]'
120131
uses: ./.github/workflows/sycl-windows-run-tests.yml
121132
with:
122-
name: Intel GEN12 Graphics with Level Zero
123-
runner: '["Windows","gen12"]'
133+
name: ${{ matrix.name }}
134+
runner: ${{ matrix.runner }}
124135
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
125-
extra_lit_opts: --param gpu-intel-gen12=True
136+
extra_lit_opts: ${{ matrix.extra_lit_opts }}
126137
repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }}
127138
devops_ref: sycl
128139

@@ -203,7 +214,7 @@ jobs:
203214
image_options: ${{ matrix.image_options }}
204215
target_devices: ${{ matrix.target_devices }}
205216
tests_selector: cts
206-
repo_ref: ${{ github.sha }}
217+
repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }}
207218
devops_ref: sycl
208219
sycl_toolchain_artifact: sycl_linux_default
209220
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ on:
2121
- '.github/workflows/sycl-macos-*.yml'
2222
- '.github/workflows/sycl-nightly.yml'
2323
- '.github/workflows/sycl-rel-nightly.yml'
24+
- '.github/workflows/trivy.yml'
2425
- 'devops/containers/**'
2526
- 'devops/actions/build_container/**'
27+
- 'unified-runtime/examples/**'
28+
- 'unified-runtime/scripts/**'
29+
- 'unified-runtime/test/**'
30+
- 'unified-runtime/third_party/**'
31+
- 'unified-runtime/tools/**'
2632

2733
permissions: read-all
2834

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,14 @@ jobs:
117117
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
118118
- name: Register cleanup after job is finished
119119
uses: ./devops/actions/cleanup
120-
- uses: ./devops/actions/cached_checkout
120+
- uses: actions/checkout@v4
121121
if: inputs.tests_selector == 'e2e'
122122
with:
123123
path: llvm
124124
ref: ${{ inputs.repo_ref || github.sha }}
125-
cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\"
125+
sparse-checkout: |
126+
llvm/utils/lit
127+
sycl/test-e2e
126128
- name: Download compiler toolchain
127129
uses: actions/download-artifact@v4
128130
with:

.github/workflows/trivy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
run: ./bin/trivy config --format json --output trivy-report.json --ignorefile=devops/.trivyignore.yaml devops/containers --exit-code 1
3131

3232
- name: Upload report artifact
33+
if: always() && !cancelled()
3334
uses: actions/upload-artifact@v4
3435
with:
3536
name: trivy-report

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5885,8 +5885,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
58855885
CmdArgs.push_back("-ffine-grained-bitfield-accesses");
58865886
}
58875887

5888-
if (!Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5889-
options::OPT_fno_sycl_unnamed_lambda, true))
5888+
// '-fsycl-unnamed-lambda' is not supported with '-fsycl-host-compiler'
5889+
if (Args.hasArg(options::OPT_fsycl_host_compiler_EQ)) {
5890+
if (Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5891+
options::OPT_fno_sycl_unnamed_lambda, false))
5892+
D.Diag(diag::err_drv_cannot_mix_options) << "-fsycl-host-compiler"
5893+
<< "-fsycl-unnamed-lambda";
5894+
else // '-fsycl-host-compiler' implies '-fno-sycl-unnamed-lambda'
5895+
CmdArgs.push_back("-fno-sycl-unnamed-lambda");
5896+
} else if (!Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5897+
options::OPT_fno_sycl_unnamed_lambda, true))
58905898
CmdArgs.push_back("-fno-sycl-unnamed-lambda");
58915899

58925900
if (!Args.hasFlag(options::OPT_fsycl_esimd_force_stateless_mem,

clang/test/CodeGenSYCL/sub-group-size.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ using namespace sycl;
1515
// ALL-DAG: define {{.*}}spir_func void @{{.*}}external_10{{.*}}() #{{[0-9]+}}{{.*}} !intel_reqd_sub_group_size ![[TEN:[0-9]+]]
1616

1717
SYCL_EXTERNAL void external_default_behavior() {}
18-
// NONE-DAG: define {{.*}}spir_func void @{{.*}}external_default_behavior{{.*}}() #{{[0-9]+}} !srcloc !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
18+
// NONE-DAG: define {{.*}}spir_func void @{{.*}}external_default_behavior{{.*}}() #{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
1919
// PRIM_DEF-DAG: define {{.*}}spir_func void @{{.*}}external_default_behavior{{.*}}() #{{[0-9]+}}{{.*}} !intel_reqd_sub_group_size ![[PRIMARY]]
2020
// TEN_DEF-DAG: define {{.*}}spir_func void @{{.*}}external_default_behavior{{.*}}() #{{[0-9]+}}{{.*}} !intel_reqd_sub_group_size ![[TEN]]
2121

2222
void default_behavior() {
2323
kernel_single_task<class Kernel1>([]() {
2424
});
2525
}
26-
// NONE-DAG: define {{.*}}spir_kernel void @{{.*}}Kernel1() #{{[0-9]+}} !srcloc !{{[0-9]+}} !kernel_arg_buffer_location !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
26+
// NONE-DAG: define {{.*}}spir_kernel void @{{.*}}Kernel1() #{{[0-9]+}} !kernel_arg_buffer_location !{{[0-9]+}} !sycl_fixed_targets !{{[0-9]+}} {
2727
// PRIM_DEF-DAG: define {{.*}}spir_kernel void @{{.*}}Kernel1() #{{[0-9]+}}{{.*}} !intel_reqd_sub_group_size ![[PRIMARY]]
2828
// TEN_DEF-DAG: define {{.*}}spir_kernel void @{{.*}}Kernel1() #{{[0-9]+}}{{.*}} !intel_reqd_sub_group_size ![[TEN]]
2929

0 commit comments

Comments
 (0)