Skip to content

Commit 295c315

Browse files
authored
Merge branch 'intel:sycl' into l0v2
2 parents cf906bf + 03c2469 commit 295c315

File tree

217 files changed

+5226
-1766
lines changed

Some content is hidden

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

217 files changed

+5226
-1766
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
paths-ignore:
1313
- '.github/ISSUE_TEMPLATE/**'
1414
- '.github/CODEOWNERS'
15+
- 'sycl/cts_exclude_filter/**'
1516
- 'sycl/doc/**'
1617
- 'sycl/gdb/**'
1718
- 'clang/docs/**'

.github/workflows/sycl-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
runner: '["Windows", "build-e2e"]'
258258
cts_testing_mode: 'build-only'
259259
tests_selector: cts
260-
ref: ${{ github.sha }}
260+
repo_ref: ${{ github.sha }}
261261
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
262262
sycl_cts_artifact: sycl_cts_bin_win
263263

@@ -278,7 +278,7 @@ jobs:
278278
cts_testing_mode: 'run-only'
279279
target_devices: ${{ matrix.target_devices }}
280280
tests_selector: cts
281-
ref: ${{ github.sha }}
281+
repo_ref: ${{ github.sha }}
282282
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
283283
sycl_cts_artifact: sycl_cts_bin_win
284284

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:
23-
ref: sycl-rel-6_0_0
23+
ref: sycl-rel-6_1_0
2424
- run: git show --quiet | tee -a $GITHUB_STEP_SUMMARY
2525

2626
- id: is_new_commit
@@ -40,7 +40,7 @@ jobs:
4040
build_artifact_suffix: default
4141
build_configure_extra_args: '--hip --cuda'
4242
build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest
43-
build_ref: sycl-rel-6_0_0
43+
build_ref: sycl-rel-6_1_0
4444

4545
# We upload the build for people to download/use, override its name and
4646
# prefer widespread gzip compression.
@@ -89,7 +89,7 @@ jobs:
8989
tests_selector: ${{ matrix.tests_selector }}
9090
extra_lit_opts: ${{ matrix.extra_lit_opts }}
9191
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
92-
repo_ref: sycl-rel-6_0_0
92+
repo_ref: sycl-rel-6_1_0
9393
devops_ref: sycl
9494
sycl_toolchain_artifact: sycl_linux_default
9595
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
@@ -100,7 +100,7 @@ jobs:
100100
if: ${{ github.repository == 'intel/llvm' && needs.check_for_new_commits.outputs.is_new_commit != 'false' }}
101101
uses: ./.github/workflows/sycl-windows-build.yml
102102
with:
103-
ref: sycl-rel-6_0_0
103+
ref: sycl-rel-6_1_0
104104

105105
# We upload both Linux/Windows build via Github's "Releases"
106106
# functionality, make sure Linux/Windows names follow the same pattern.
@@ -119,7 +119,7 @@ jobs:
119119
runner: '["Windows","gen12"]'
120120
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
121121
extra_lit_opts: --param gpu-intel-gen12=True
122-
ref: sycl-rel-6_0_0
122+
repo_ref: sycl-rel-6_1_0
123123
devops_ref: sycl
124124

125125
cuda-aws-start:
@@ -129,7 +129,7 @@ jobs:
129129
secrets: inherit
130130
with:
131131
mode: start
132-
ref: sycl-rel-6_0_0
132+
ref: sycl-rel-6_1_0
133133

134134
cuda-run-tests:
135135
needs: [ubuntu2204_build, cuda-aws-start]
@@ -141,7 +141,7 @@ jobs:
141141
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
142142
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1
143143
target_devices: cuda:gpu
144-
repo_ref: sycl-rel-6_0_0
144+
repo_ref: sycl-rel-6_1_0
145145
devops_ref: sycl
146146

147147
sycl_toolchain_artifact: sycl_linux_default
@@ -155,7 +155,7 @@ jobs:
155155
secrets: inherit
156156
with:
157157
mode: stop
158-
ref: sycl-rel-6_0_0
158+
ref: sycl-rel-6_1_0
159159

160160
build-sycl-cts:
161161
needs: ubuntu2204_build
@@ -167,11 +167,13 @@ jobs:
167167
cts_testing_mode: 'build-only'
168168
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
169169
tests_selector: cts
170-
repo_ref: sycl-rel-6_0_0
170+
repo_ref: sycl-rel-6_1_0
171171
devops_ref: sycl
172+
tests_ref: ead7474b9cb2189ce48025550912ccad5a72bd30
172173
sycl_toolchain_artifact: sycl_linux_default
173174
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
174175
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
176+
sycl_cts_artifact: sycl_cts_bin_linux
175177

176178
run-sycl-cts:
177179
needs: [ubuntu2204_build, build-sycl-cts]
@@ -202,4 +204,4 @@ jobs:
202204
sycl_toolchain_artifact: sycl_linux_default
203205
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
204206
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
205-
sycl_cts_artifact: sycl_cts_bin
207+
sycl_cts_artifact: sycl_cts_bin_linux

.github/workflows/sycl-weekly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# This workflow builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen and
2-
# runs it with opencl:cpu & gen12 and level_zero:gpu & PVC on Sundays.
3-
4-
name: SYCL-CTS with SPIR-V backend
1+
name: SYCL Weekly
52

63
on:
74
workflow_dispatch:
85
schedule:
6+
# At 00:00 on Sunday.
97
- cron: '0 0 * * 0'
108

119
permissions: read-all
@@ -20,6 +18,7 @@ jobs:
2018
build_artifact_suffix: default
2119
build_configure_extra_args: ''
2220

21+
# This job builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen.
2322
build-sycl-cts:
2423
needs: ubuntu2204_build
2524
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
@@ -35,6 +34,7 @@ jobs:
3534
sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }}
3635
sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }}
3736
extra_cmake_args: -DDPCPP_FLAGS=-fsycl-use-spirv-backend-for-spirv-gen
37+
sycl_cts_artifact: sycl_cts_bin
3838

3939
run-sycl-cts:
4040
needs: [ubuntu2204_build, build-sycl-cts]

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
paths-ignore:
1111
- '.github/ISSUE_TEMPLATE/**'
1212
- '.github/CODEOWNERS'
13+
- 'sycl/cts_exclude_filter/**'
1314
- 'sycl/doc/**'
1415
- 'sycl/gdb/**'
1516
- 'clang/docs/**'

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
name:
77
type: string
88
required: True
9+
910
runner:
1011
type: string
1112
required: True
@@ -27,19 +28,17 @@ on:
2728
Extra options to be added to LIT_OPTS.
2829
type: string
2930
default: ''
30-
ref:
31+
32+
repo_ref:
3133
type: string
3234
required: False
35+
description: |
36+
Commit SHA or branch to checkout the intel/llvm repo.
3337
devops_ref:
3438
type: string
3539
required: False
3640
description: |
37-
By default we checkout the devops directory from "inputs.ref" branch.
38-
devops_ref may be specified to checkout the devops dir from different
39-
branch.
40-
Note: it doesn't affect ./devops/actions/run-tests/* as these actions
41-
call checkout again and therefore override the devops directory, so
42-
configs/dependecies from input.ref are used.
41+
Commit SHA or branch to checkout the devops directory.
4342
tests_ref:
4443
type: string
4544
required: False
@@ -104,7 +103,7 @@ jobs:
104103
with:
105104
sparse-checkout: |
106105
devops/actions
107-
ref: ${{ inputs.devops_ref|| inputs.ref || github.sha }}
106+
ref: ${{ inputs.devops_ref|| inputs.repo_ref || github.sha }}
108107
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
109108
with:
110109
arch: amd64
@@ -122,7 +121,7 @@ jobs:
122121
if: inputs.tests_selector == 'e2e'
123122
with:
124123
path: llvm
125-
ref: ${{ inputs.ref || github.sha }}
124+
ref: ${{ inputs.repo_ref || github.sha }}
126125
cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\"
127126
- name: Download compiler toolchain
128127
uses: actions/download-artifact@v4

clang/lib/Driver/OffloadBundler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,10 @@ class ObjectFileHandler final : public FileHandler {
700700
if (SF->isIR() &&
701701
(Name == "llvm.used" || Name == "llvm.compiler.used" ||
702702
Name == "__AsanDeviceGlobalMetadata" ||
703-
Name == "__AsanKernelMetadata" || Name == "__MsanKernelMetadata"))
703+
Name == "__MsanDeviceGlobalMetadata" ||
704+
Name == "__TsanDeviceGlobalMetadata" ||
705+
Name == "__AsanKernelMetadata" || Name == "__MsanKernelMetadata" ||
706+
Name == "__TsanKernelMetadata"))
704707
continue;
705708

706709
// Add symbol name with the target prefix to the buffer.

clang/lib/Sema/SPIRVBuiltins.td

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -911,52 +911,68 @@ foreach name = ["MemoryBarrier"] in {
911911
// 3.32.21. Group and Subgroup Instructions
912912

913913
foreach name = ["GroupAsyncCopy"] in {
914-
// TODO: Allow enum flags instead of UInt ?
915-
// TODO: We should enforce that the UInt must be a literal.
916-
def : SPVBuiltin<name, [Event, UInt, PointerType<AGenTypeN, LocalAS>, PointerType<ConstType<AGenTypeN>, GlobalAS>, Size, Size, Event], Attr.Convergent>;
917-
def : SPVBuiltin<name, [Event, UInt, PointerType<AGenTypeN, GlobalAS>, PointerType<ConstType<AGenTypeN>, LocalAS>, Size, Size, Event], Attr.Convergent>;
914+
// TODO: Allow enum flags instead of Int ?
915+
// TODO: We should enforce that the Int must be a literal.
916+
def : SPVBuiltin<name,
917+
[Event, Int, PointerType<AGenTypeN, LocalAS>,
918+
PointerType<ConstType<AGenTypeN>, GlobalAS>, Size, Size,
919+
Event],
920+
Attr.Convergent>;
921+
def : SPVBuiltin<name,
922+
[Event, Int, PointerType<AGenTypeN, GlobalAS>,
923+
PointerType<ConstType<AGenTypeN>, LocalAS>, Size, Size,
924+
Event],
925+
Attr.Convergent>;
918926
}
919927

920928
foreach name = ["GroupWaitEvents"] in {
921-
def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, DefaultAS>], Attr.Convergent>;
922-
def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, PrivateAS>], Attr.Convergent>;
923-
def : SPVBuiltin<name, [Void, UInt, Int, PointerType<Event, GenericAS>], Attr.Convergent>;
929+
def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, DefaultAS>],
930+
Attr.Convergent>;
931+
def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, PrivateAS>],
932+
Attr.Convergent>;
933+
def : SPVBuiltin<name, [Void, Int, Int, PointerType<Event, GenericAS>],
934+
Attr.Convergent>;
924935
}
925936

926937
foreach name = ["GroupAll", "GroupAny"] in {
927-
def : SPVBuiltin<name, [Bool, UInt, Bool], Attr.Convergent>;
938+
def : SPVBuiltin<name, [Bool, Int, Bool], Attr.Convergent>;
928939
}
929940

930941
foreach name = ["GroupBroadcast"] in {
931942
foreach IDType = TLAllInts.List in {
932-
def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, IDType], Attr.Convergent>;
933-
def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, VectorType<IDType, 2>], Attr.Convergent>;
934-
def : SPVBuiltin<name, [AGenTypeN, UInt, AGenTypeN, VectorType<IDType, 3>], Attr.Convergent>;
935-
def : SPVBuiltin<name, [Bool, UInt, Bool, IDType], Attr.Convergent>;
936-
def : SPVBuiltin<name, [Bool, UInt, Bool, VectorType<IDType, 2>], Attr.Convergent>;
937-
def : SPVBuiltin<name, [Bool, UInt, Bool, VectorType<IDType, 3>], Attr.Convergent>;
943+
def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, IDType],
944+
Attr.Convergent>;
945+
def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, VectorType<IDType, 2>],
946+
Attr.Convergent>;
947+
def : SPVBuiltin<name, [AGenTypeN, Int, AGenTypeN, VectorType<IDType, 3>],
948+
Attr.Convergent>;
949+
def : SPVBuiltin<name, [Bool, Int, Bool, IDType], Attr.Convergent>;
950+
def : SPVBuiltin<name, [Bool, Int, Bool, VectorType<IDType, 2>],
951+
Attr.Convergent>;
952+
def : SPVBuiltin<name, [Bool, Int, Bool, VectorType<IDType, 3>],
953+
Attr.Convergent>;
938954
}
939955
}
940956

941957
foreach name = ["GroupIAdd", "GroupIMulKHR", "GroupBitwiseOrKHR",
942958
"GroupBitwiseXorKHR", "GroupBitwiseAndKHR"] in {
943-
def : SPVBuiltin<name, [AIGenTypeN, UInt, UInt, AIGenTypeN], Attr.Convergent>;
959+
def : SPVBuiltin<name, [AIGenTypeN, Int, Int, AIGenTypeN], Attr.Convergent>;
944960
}
945961

946962
foreach name = ["GroupFAdd", "GroupFMin", "GroupFMax",
947963
"GroupFMulKHR"] in {
948-
def : SPVBuiltin<name, [FGenTypeN, UInt, UInt, FGenTypeN], Attr.Convergent>;
964+
def : SPVBuiltin<name, [FGenTypeN, Int, Int, FGenTypeN], Attr.Convergent>;
949965
}
950966

951967
foreach name = ["GroupUMin", "GroupUMax"] in {
952-
def : SPVBuiltin<name, [AUIGenTypeN, UInt, UInt, AUIGenTypeN], Attr.Convergent>;
968+
def : SPVBuiltin<name, [AUIGenTypeN, Int, Int, AUIGenTypeN], Attr.Convergent>;
953969
}
954970

955971
foreach name = ["GroupSMin", "GroupSMax"] in {
956-
def : SPVBuiltin<name, [ASIGenTypeN, UInt, UInt, ASIGenTypeN], Attr.Convergent>;
972+
def : SPVBuiltin<name, [ASIGenTypeN, Int, Int, ASIGenTypeN], Attr.Convergent>;
957973
}
958974

959975
// TODO: These builtins need to support vectors of bool.
960976
foreach name = ["GroupLogicalAndKHR", "GroupLogicalOrKHR"] in {
961-
def : SPVBuiltin<name, [Bool, UInt, UInt, Bool], Attr.Convergent>;
977+
def : SPVBuiltin<name, [Bool, Int, Int, Bool], Attr.Convergent>;
962978
}

clang/lib/Sema/SemaExpr.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7124,18 +7124,6 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,
71247124
return ExprError();
71257125
}
71267126

7127-
// Diagnose function pointers in SYCL.
7128-
if (!FDecl && !getLangOpts().SYCLAllowFuncPtr && getLangOpts().SYCLIsDevice &&
7129-
!isUnevaluatedContext()) {
7130-
bool MaybeConstantExpr = false;
7131-
Expr *NonDirectCallee = TheCall->getCallee();
7132-
if (!NonDirectCallee->isValueDependent())
7133-
MaybeConstantExpr = NonDirectCallee->isCXX11ConstantExpr(getASTContext());
7134-
if (!MaybeConstantExpr)
7135-
SYCL().DiagIfDeviceCode(TheCall->getExprLoc(), diag::err_sycl_restrict)
7136-
<< SemaSYCL::KernelCallFunctionPointer;
7137-
}
7138-
71397127
return CheckForImmediateInvocation(MaybeBindToTemporary(TheCall), FDecl);
71407128
}
71417129

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,17 @@ class DiagDeviceFunction : public RecursiveASTVisitor<DiagDeviceFunction> {
693693
SemaSYCLRef.Diag(e->getExprLoc(), diag::err_builtin_target_unsupported)
694694
<< Name << "SYCL device";
695695
}
696+
} else if (!SemaSYCLRef.getLangOpts().SYCLAllowFuncPtr &&
697+
!e->isTypeDependent() &&
698+
!isa<CXXPseudoDestructorExpr>(e->getCallee())) {
699+
bool MaybeConstantExpr = false;
700+
Expr *NonDirectCallee = e->getCallee();
701+
if (!NonDirectCallee->isValueDependent())
702+
MaybeConstantExpr =
703+
NonDirectCallee->isCXX11ConstantExpr(SemaSYCLRef.getASTContext());
704+
if (!MaybeConstantExpr)
705+
SemaSYCLRef.Diag(e->getExprLoc(), diag::err_sycl_restrict)
706+
<< SemaSYCL::KernelCallFunctionPointer;
696707
}
697708
return true;
698709
}

0 commit comments

Comments
 (0)