Skip to content

Commit 4581989

Browse files
committed
Merge branch 'sycl' into przemek/image-support-queries
2 parents 6491544 + 64c60c5 commit 4581989

File tree

40 files changed

+2164
-1054
lines changed

40 files changed

+2164
-1054
lines changed

.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

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/Driver/sycl-host-compiler-old-model.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@
6262
// RUN: | FileCheck -check-prefix=HOST_COMPILER_NOARG %s
6363
// HOST_COMPILER_NOARG: missing argument to '-fsycl-host-compiler='
6464

65+
/// error for -fsycl-host-compiler and -fsycl-unnamed-lambda combination
66+
// RUN: not %clangxx -fsycl --no-offload-new-driver -fsycl-host-compiler=g++ -fsycl-unnamed-lambda -c -### %s 2>&1 \
67+
// RUN: | FileCheck -check-prefix=HOST_COMPILER_AND_UNNAMED_LAMBDA %s
68+
// HOST_COMPILER_AND_UNNAMED_LAMBDA: error: cannot specify '-fsycl-unnamed-lambda' along with '-fsycl-host-compiler'
69+
70+
// -fsycl-host-compiler implies -fno-sycl-unnamed-lambda
71+
// RUN: %clangxx -### -fsycl --no-offload-new-driver -fsycl-host-compiler=g++ -c -### %s 2>&1 \
72+
// RUN: | FileCheck -check-prefix=IMPLY-NO-SYCL-UNNAMED-LAMBDA %s
73+
// IMPLY-NO-SYCL-UNNAMED-LAMBDA: clang{{.*}} "-fno-sycl-unnamed-lambda"
74+
6575
/// Warning should not be emitted when using -fsycl-host-compiler when linking
6676
// RUN: touch %t.o
6777
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-host-compiler=g++ %t.o -### 2>&1 \

devops/scripts/benchmarks/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Options:
4040
build_compute_runtime: bool = False
4141
extra_ld_libraries: list[str] = field(default_factory=list)
4242
extra_env_vars: dict = field(default_factory=dict)
43-
compute_runtime_tag: str = "25.09.32961.7"
43+
compute_runtime_tag: str = "25.09.32961.8"
4444
build_igc: bool = False
4545
current_run_name: str = "This PR"
4646
preset: str = "Full"

devops/scripts/benchmarks/utils/compute_runtime.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ def build_igc(self, repo, commit):
135135
self.igc_install = os.path.join(options.workdir, "igc-install")
136136
configure_command = [
137137
"cmake",
138+
"-DCMAKE_C_FLAGS=-Wno-error",
139+
"-DCMAKE_CXX_FLAGS=-Wno-error",
138140
f"-B {self.igc_build}",
139141
f"-S {self.igc_repo}",
140142
f"-DCMAKE_INSTALL_PREFIX={self.igc_install}",

llvm/lib/SYCLNativeCPUUtils/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ endif()
3535
if(NATIVECPU_USE_OCK)
3636
if(NATIVECPU_OCK_USE_FETCHCONTENT)
3737
set(OCK_GIT_INTERNAL_REPO "https://github.com/uxlfoundation/oneapi-construction-kit.git")
38-
# commit 652f9943b0bfcf61123a0f82b2bdd499738c5391
39-
# Merge: c24c971bcb e0f02ae739
40-
# Author: Colin Davidson <colin.davidson@codeplay.com>
41-
# Date: Fri Feb 28 15:59:50 2025 +0000
38+
# commit ffef31717750d3f15bfd2f18d9cd7f4677fe9d3e
39+
# Merge: 574307afde 0b00238554
40+
# Author: Harald van Dijk <harald.vandijk@codeplay.com>
41+
# Date: Fri Apr 4 16:26:38 2025 +0100
4242
#
43-
# Merge pull request #677 from coldav/colin/build_installed_llvm
43+
# Merge pull request #751 from hvdijk/llvm21-address-space
4444
#
45-
# Change llvm over to a choice of install or cache, default PRs to install
46-
set(OCK_GIT_INTERNAL_TAG 652f9943b0bfcf61123a0f82b2bdd499738c5391)
45+
# [LLVM 21] Take address space into account for legality.
46+
set(OCK_GIT_INTERNAL_TAG ffef31717750d3f15bfd2f18d9cd7f4677fe9d3e)
4747

4848
# Overwrite OCK_GIT_INTERNAL_REPO/OCK_GIT_INTERNAL_TAG if the corresponding options are set
4949
if(OCK_GIT_REPO)

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,11 +1192,8 @@ class __SYCL_EXPORT handler {
11921192
typename detail::get_kernel_name_t<KernelName, KernelType>::name;
11931193

11941194
// Range rounding can be disabled by the user.
1195-
// Range rounding is not done on the host device.
11961195
// Range rounding is supported only for newer SYCL standards.
11971196
#if !defined(__SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING__) && \
1198-
!defined(DPCPP_HOST_DEVICE_OPENMP) && \
1199-
!defined(DPCPP_HOST_DEVICE_PERF_NATIVE) && \
12001197
SYCL_LANGUAGE_VERSION >= 202012L
12011198
auto [RoundedRange, HasRoundedRange] = getRoundedRange(UserRange);
12021199
if (HasRoundedRange) {
@@ -1226,7 +1223,6 @@ class __SYCL_EXPORT handler {
12261223
#endif
12271224
} else
12281225
#endif // !__SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING__ &&
1229-
// !DPCPP_HOST_DEVICE_OPENMP && !DPCPP_HOST_DEVICE_PERF_NATIVE &&
12301226
// SYCL_LANGUAGE_VERSION >= 202012L
12311227
{
12321228
(void)UserRange;

sycl/source/backend.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ make_kernel_bundle(ur_native_handle_t NativeHandle,
299299
// symbols (e.g. when kernel_bundle is supposed to be joined with another).
300300
auto KernelIDs = std::make_shared<std::vector<kernel_id>>();
301301
auto DevImgImpl = std::make_shared<device_image_impl>(
302-
nullptr, TargetContext, Devices, State, KernelIDs, UrProgram);
302+
nullptr, TargetContext, Devices, State, KernelIDs, UrProgram,
303+
ImageOriginInterop);
303304
device_image_plain DevImg{DevImgImpl};
304305

305306
return std::make_shared<kernel_bundle_impl>(TargetContext, Devices, DevImg);

0 commit comments

Comments
 (0)