Skip to content

Commit 5b5329d

Browse files
committed
Merge branch 'sycl' of https://github.com/intel/llvm into move-ur-files
2 parents 54a48e4 + 361ff83 commit 5b5329d

File tree

133 files changed

+3590
-486
lines changed

Some content is hidden

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

133 files changed

+3590
-486
lines changed

.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-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/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
}

clang/test/SemaSYCL/constexpr-function-pointer.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -sycl-std=2020 -std=c++17 %s
2-
// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify=host -sycl-std=2020 -std=c++17 %s
32

43
// This test checks that the compiler doesn't emit an error when indirect call
54
// was made through a function pointer that is constant expression, and makes
65
// sure that the error is emitted when a function pointer is not a constant
76
// expression.
87

9-
// host-no-diagnostics
10-
118
void t() {}
129

1310
constexpr auto F = t;
@@ -25,8 +22,6 @@ void bar1(const SomeFunc fptr) {
2522

2623
template <auto f> void fooNTTP() { f(); }
2724

28-
template <typename FTy> void templated(FTy f) { f(); } // #call-templated
29-
3025
__attribute__((sycl_device)) void bar() {
3126
// OK
3227
constexpr auto f = t;
@@ -53,19 +48,4 @@ __attribute__((sycl_device)) void bar() {
5348
fff();
5449

5550
fooNTTP<t>();
56-
57-
templated(t);
58-
// expected-error@#call-templated {{SYCL kernel cannot call through a function pointer}}
59-
// expected-note@-2 {{called by 'bar'}}
60-
}
61-
62-
void from_host() {
63-
const auto f1 = t;
64-
f1();
65-
auto f2 = t;
66-
f2();
67-
68-
fooNTTP<t>();
69-
70-
templated(t);
7151
}

devops/dependencies.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"linux": {
33
"compute_runtime": {
4-
"github_tag": "25.05.32567.17",
5-
"version": "25.05.32567.17",
6-
"url": "https://github.com/intel/compute-runtime/releases/tag/25.05.32567.17",
4+
"github_tag": "25.09.32961.5",
5+
"version": "25.09.32961.5",
6+
"url": "https://github.com/intel/compute-runtime/releases/tag/25.09.32961.5",
77
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
88
},
99
"igc": {
10-
"github_tag": "v2.5.6",
11-
"version": "v2.5.6",
12-
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/v2.5.6",
10+
"github_tag": "v2.8.3",
11+
"version": "v2.8.3",
12+
"url": "https://github.com/intel/intel-graphics-compiler/releases/tag/v2.8.3",
1313
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
1414
},
1515
"cm": {

llvm/include/llvm/SYCLLowerIR/DeviceConfigFile.td

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def AspectExt_oneapi_atomic16 : Aspect<"ext_oneapi_atomic16">;
8888
def AspectExt_oneapi_virtual_functions : Aspect<"ext_oneapi_virtual_functions">;
8989
def AspectExt_intel_spill_memory_size : Aspect<"ext_intel_spill_memory_size">;
9090
def AspectExt_oneapi_bindless_images_gather : Aspect<"ext_oneapi_bindless_images_gather">;
91+
def AspectExt_intel_current_clock_throttle_reasons : Aspect<"ext_intel_current_clock_throttle_reasons">;
92+
def AspectExt_intel_fan_speed : Aspect<"ext_intel_fan_speed">;
93+
def AspectExt_intel_power_limits : Aspect<"ext_intel_power_limits">;
94+
9195
// Deprecated aspects
9296
def AspectInt64_base_atomics : Aspect<"int64_base_atomics">;
9397
def AspectInt64_extended_atomics : Aspect<"int64_extended_atomics">;
@@ -154,7 +158,10 @@ def : TargetInfo<"__TestAspectList",
154158
AspectExt_intel_fpga_task_sequence,
155159
AspectExt_oneapi_atomic16,
156160
AspectExt_oneapi_virtual_functions,
157-
AspectExt_intel_spill_memory_size],
161+
AspectExt_intel_spill_memory_size,
162+
AspectExt_intel_current_clock_throttle_reasons,
163+
AspectExt_intel_fan_speed,
164+
AspectExt_intel_power_limits],
158165
[]>;
159166
// This definition serves the only purpose of testing whether the deprecated aspect list defined in here and in SYCL RT
160167
// match.

llvm/lib/SYCLLowerIR/LowerWGScope.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -938,24 +938,26 @@ Value *spirv::genPseudoLocalID(Instruction &Before, const Triple &TT) {
938938
IRBuilder<> Bld(Ctx);
939939
Bld.SetInsertPoint(&Before);
940940

941-
#define CREATE_CALLEE(NAME, FN_NAME) \
942-
FunctionCallee FnCallee##NAME = M.getOrInsertFunction(FN_NAME, RetTy); \
943-
assert(FnCallee##NAME && "spirv intrinsic creation failed"); \
944-
auto NAME = Bld.CreateCall(FnCallee##NAME, {});
945-
946-
CREATE_CALLEE(LocalInvocationId_X, "_Z27__spirv_LocalInvocationId_xv");
947-
CREATE_CALLEE(LocalInvocationId_Y, "_Z27__spirv_LocalInvocationId_yv");
948-
CREATE_CALLEE(LocalInvocationId_Z, "_Z27__spirv_LocalInvocationId_zv");
949-
950-
#undef CREATE_CALLEE
941+
auto CreateCallee = [&](StringRef Name) {
942+
FunctionCallee Callee = M.getOrInsertFunction(Name, RetTy);
943+
assert(Callee.getCallee() && "spirv intrinsic creation failed");
944+
return Bld.CreateCall(Callee, {});
945+
};
946+
947+
Value *LocalInvocationIdX =
948+
CreateCallee("_Z27__spirv_LocalInvocationId_xv");
949+
Value *LocalInvocationIdY =
950+
CreateCallee("_Z27__spirv_LocalInvocationId_yv");
951+
Value *LocalInvocationIdZ =
952+
CreateCallee("_Z27__spirv_LocalInvocationId_zv");
951953

952954
// 1: returns
953955
// __spirv_LocalInvocationId_x() |
954956
// __spirv_LocalInvocationId_y() |
955957
// __spirv_LocalInvocationId_z()
956958
//
957-
return Bld.CreateOr(LocalInvocationId_X,
958-
Bld.CreateOr(LocalInvocationId_Y, LocalInvocationId_Z));
959+
return Bld.CreateOr(LocalInvocationIdX,
960+
Bld.CreateOr(LocalInvocationIdY, LocalInvocationIdZ));
959961
} else {
960962
// extern "C" const __constant size_t __spirv_BuiltInLocalInvocationIndex;
961963
// Must correspond to the code in

llvm/lib/SYCLPostLink/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ add_llvm_component_library(LLVMSYCLPostLink
1414
LLVMDemangle
1515
LLVMTargetParser
1616
LLVMTransformUtils
17+
LLVMSYCLLowerIR
1718

1819
LINK_COMPONENTS
1920
Analysis

0 commit comments

Comments
 (0)