Skip to content

Commit 965f78c

Browse files
committed
Merge branch 'sycl' into fabio/graph_micro_optimizations
2 parents 847aad9 + fa6bc3d commit 965f78c

File tree

526 files changed

+7693
-3378
lines changed

Some content is hidden

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

526 files changed

+7693
-3378
lines changed

.github/workflows/coverity.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
4747
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release \
4848
--ci-defaults --hip --cuda \
49-
-DNATIVECPU_USE_OCK=Off \
50-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
49+
-DNATIVECPU_USE_OCK=Off
5150
5251
- name: Build with coverity
5352
run: $GITHUB_WORKSPACE/cov-analysis-linux64-*/bin/cov-build --dir cov-int cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- *libclc
5555
- 'sycl/*'
5656
- 'sycl/!(test-e2e|doc)/**'
57+
- 'libdevice/**'
5758
ci:
5859
- .github/workflows/**
5960
# devops/* contains config files, including drivers versions.

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Reusable SYCL Linux build workflow
22

3+
defaults:
4+
run:
5+
shell: bash
6+
37
on:
48
workflow_call:
59
inputs:
@@ -42,7 +46,7 @@ on:
4246
changes:
4347
type: string
4448
description: 'Filter matches for the changed files in the PR'
45-
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
49+
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
4650
required: false
4751
retention-days:
4852
description: 'Artifacts retention period'
@@ -70,7 +74,7 @@ on:
7074
type: choice
7175
options:
7276
- "[]"
73-
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
77+
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
7478
build_image:
7579
type: choice
7680
options:
@@ -177,21 +181,29 @@ jobs:
177181
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
178182
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
179183
-DLLVM_INSTALL_UTILS=ON \
180-
-DNATIVECPU_USE_OCK=Off \
181-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
184+
-DNATIVECPU_USE_OCK=Off
182185
- name: Compile
183186
id: build
184187
# Emulate default value for manual dispatch as we've run out of available arguments.
185188
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
186189
- name: check-llvm
187190
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
188191
run: |
192+
if [[ "${{ inputs.build_configure_extra_args }}" == *"--use-libcxx"* ]]; then
193+
# https://github.com/llvm/llvm-project/issues/59429
194+
export LIT_FILTER_OUT="ExecutionEngine/MCJIT"
195+
fi
196+
189197
cmake --build $GITHUB_WORKSPACE/build --target check-llvm
190198
- name: check-clang
191199
if: always() && !cancelled() && contains(inputs.changes, 'clang')
192200
run: |
193201
# Can we move this to Dockerfile? Hopefully, noop on Windows.
194202
export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache
203+
if [[ "${{ inputs.build_configure_extra_args }}" == *"--use-libcxx"* ]]; then
204+
# https://github.com/llvm/llvm-project/issues/59428
205+
export LIT_FILTER_OUT="(E|e)xception"
206+
fi
195207
cmake --build $GITHUB_WORKSPACE/build --target check-clang
196208
- name: check-sycl
197209
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
@@ -218,7 +230,7 @@ jobs:
218230
run: |
219231
cmake --build $GITHUB_WORKSPACE/build --target check-libclc
220232
- name: check-libdevice
221-
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
233+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
222234
run: |
223235
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
224236
- name: Check E2E test requirements
@@ -281,7 +293,6 @@ jobs:
281293

282294
- name: Source OneAPI TBB vars.sh
283295
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
284-
shell: bash
285296
run: |
286297
# https://github.com/actions/runner/issues/1964 prevents us from using
287298
# the ENTRYPOINT in the image.

.github/workflows/sycl-nightly.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ jobs:
5151

5252
artifact_archive_name: sycl_linux_oneapi.tar.zst
5353

54+
ubuntu2404_libcxx_build:
55+
if: github.repository == 'intel/llvm'
56+
uses: ./.github/workflows/sycl-linux-build.yml
57+
secrets: inherit
58+
with:
59+
build_cache_root: "/__w/"
60+
build_cache_suffix: libcxx
61+
build_artifact_suffix: libcxx
62+
build_configure_extra_args: --use-libcxx -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=OFF
63+
cc: clang-18
64+
cxx: clang++-18
65+
66+
artifact_archive_name: sycl_linux_libcxx.tar.zst
67+
5468
ubuntu2204_test:
5569
needs: [ubuntu2204_build]
5670
if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI sycl-rel container
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- 'devops/actions/build_container/**'
8+
- 'devops/containers/release_build.DockerFile'
9+
- 'devops/scripts/create-sycl-user.sh'
10+
- '.github/workflows/sycl-rel-container.yaml'
11+
12+
permissions: read-all
13+
14+
jobs:
15+
build_and_push_images:
16+
if: github.repository == 'intel/llvm'
17+
name: Build and Push Docker Images
18+
runs-on: [Linux, build]
19+
permissions:
20+
packages: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
sparse-checkout: devops
26+
27+
- name: Build and Push Container
28+
uses: ./devops/actions/build_container
29+
with:
30+
push: ${{ github.event_name != 'pull_request' }}
31+
file: release_build
32+
username: ${{ github.repository_owner }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
tags: |
35+
ghcr.io/${{ github.repository }}/release_build:latest-${{ github.sha }}
36+
ghcr.io/${{ github.repository }}/release_build:latest

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
changes:
1818
type: string
1919
description: 'Filter matches for the changed files in the PR'
20-
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
20+
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
2121
required: false
2222
ref:
2323
type: string
@@ -54,7 +54,7 @@ on:
5454
options:
5555
- "[]"
5656
- '[sycl]'
57-
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
57+
- '[llvm, clang, sycl, llvm_spirv, xptifw, libclc]'
5858
build_cache_suffix:
5959
type: choice
6060
options:
@@ -146,8 +146,7 @@ jobs:
146146
"-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^
147147
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^
148148
-DCMAKE_C_COMPILER_LAUNCHER=ccache ^
149-
-DLLVM_INSTALL_UTILS=ON ^
150-
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
149+
-DLLVM_INSTALL_UTILS=ON
151150
- name: Build
152151
id: build
153152
shell: bash
@@ -180,7 +179,7 @@ jobs:
180179
run: |
181180
cmake --build build --target check-xptifw
182181
- name: check-libdevice
183-
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
182+
if: always() && !cancelled() && contains(inputs.changes, 'sycl')
184183
run: |
185184
cmake --build build --target check-libdevice
186185
- name: Generate/diff new ABI symbols

buildbot/configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def do_configure(args, passthrough_args):
4646
xptifw_dir = os.path.join(abs_src_dir, "xptifw")
4747
libdevice_dir = os.path.join(abs_src_dir, "libdevice")
4848
jit_dir = os.path.join(abs_src_dir, "sycl-jit")
49-
llvm_targets_to_build = args.host_target
49+
llvm_targets_to_build = args.host_target + ";SPIRV"
5050
llvm_enable_projects = "clang;" + llvm_external_projects
5151
libclc_build_native = "OFF"
5252
libclc_targets_to_build = ""

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,6 @@ const char *SYCLInstallationDetector::findLibspirvPath(
210210
void SYCLInstallationDetector::addLibspirvLinkArgs(
211211
const llvm::Triple &DeviceTriple, const llvm::opt::ArgList &DriverArgs,
212212
const llvm::Triple &HostTriple, llvm::opt::ArgStringList &CC1Args) const {
213-
DriverArgs.claimAllArgs(options::OPT_fno_sycl_libspirv);
214-
215-
if (D.offloadDeviceOnly())
216-
return;
217-
218213
if (DriverArgs.hasArg(options::OPT_fno_sycl_libspirv)) {
219214
// -fno-sycl-libspirv flag is reserved for very unusual cases where the
220215
// libspirv library is not linked when required by the device: so output

clang/test/Driver/sycl-libspirv-toolchain.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
//
2222
// RUN: %clang -### -fsycl -fsycl-device-only -fsycl-targets=nvptx64-nvidia-cuda -nocudalib %s 2>&1 \
2323
// RUN: | FileCheck %s --check-prefixes=CHECK-DEVICE-ONLY
24-
// CHECK-DEVICE-ONLY: "-cc1"{{.*}} "-fsycl-is-device"
25-
// CHECK-DEVICE-ONLY-NOT: "-mlink-builtin-bitcode" "{{.*}}.libspirv-{{.*}}.bc"
24+
// CHECK-DEVICE-ONLY: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-mlink-builtin-bitcode" "{{.*[\\/]}}remangled-{{.*}}.libspirv-nvptx64-nvidia-cuda.bc"
2625
//
2726
// Only link libspirv in SYCL language mode, `-fno-sycl-libspirv` should result in a warning
2827
// RUN: %clang -### -x cu -fno-sycl-libspirv -nocudainc -nocudalib %s 2>&1 | FileCheck %s --check-prefixes=CHECK-CUDA

clang/test/Driver/sycl-linker-wrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
// -------
207207
// Generate .o file as linker wrapper input.
208208
//
209-
// RUN: %clang %s -fsycl -fsycl-targets=native_cpu -c --offload-new-driver -o %t6.o
209+
// RUN: %clang %s -fsycl -fsycl-targets=native_cpu -c --offload-new-driver -fno-sycl-libspirv -o %t6.o
210210
//
211211
// RUN: clang-linker-wrapper "--host-triple=x86_64-unknown-linux-gnu" "-sycl-device-library-location=%S/Inputs/native_cpu" "--sycl-post-link-options=SYCL_POST_LINK_OPTIONS" "--linker-path=/usr/bin/ld" "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" %t6.o --dry-run 2>&1 | FileCheck -check-prefix=CHK-CMDS-NATIVE-CPU %s
212212
// CHK-CMDS-NATIVE-CPU: "{{.*}}/spirv-to-ir-wrapper" {{.*}} --llvm-spirv-opts --spirv-preserve-auxdata --spirv-target-env=SPV-IR --spirv-builtin-format=global

0 commit comments

Comments
 (0)