Skip to content

Commit acea892

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
Conflicts: clang/lib/Driver/ToolChains/SYCL.cpp llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
2 parents 5f5d631 + ceae49b commit acea892

File tree

162 files changed

+6094
-1979
lines changed

Some content is hidden

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

162 files changed

+6094
-1979
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
id: build
210210
# Emulate default value for manual dispatch as we've run out of available arguments.
211211
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
212+
- run: $GITHUB_WORKSPACE/build/bin/clang++ --version
212213
- name: check-llvm
213214
if: ${{ !cancelled() && contains(inputs.changes, 'llvm') }}
214215
env:

.github/workflows/sycl-nightly.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@ jobs:
2323
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_linux.dump sycl/test/abi/sycl_symbols_linux-sycl-rel-6_3.dump
2424
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_windows.dump sycl/test/abi/sycl_symbols_windows-sycl-rel-6_3.dump
2525
26+
get_date:
27+
runs-on: ubuntu-latest
28+
outputs:
29+
date: ${{ steps.get_date.outputs.date }}
30+
steps:
31+
- id: get_date
32+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
33+
2634
ubuntu2204_build:
35+
needs: get_date
2736
if: github.repository == 'intel/llvm'
2837
uses: ./.github/workflows/sycl-linux-build.yml
2938
secrets: inherit
3039
with:
3140
build_cache_root: "/__w/"
32-
build_configure_extra_args: '--hip --cuda'
41+
build_configure_extra_args: '--hip --cuda -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}"'
3342
build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest
3443

3544
retention-days: 90
@@ -189,6 +198,7 @@ jobs:
189198
toolchain_decompress_command: ${{ needs.ubuntu2404_oneapi_build.outputs.toolchain_decompress_command }}
190199

191200
build-win:
201+
needs: get_date
192202
uses: ./.github/workflows/sycl-windows-build.yml
193203
if: github.repository == 'intel/llvm'
194204
with:
@@ -197,7 +207,7 @@ jobs:
197207
# functionality, make sure Linux/Windows names follow the same pattern.
198208
toolchain_artifact_filename: sycl_windows.tar.gz
199209
# Disable the spirv-dis requirement as to not require SPIR-V Tools.
200-
build_configure_extra_args: -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off
210+
build_configure_extra_args: -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=off -DSYCL_BUILD_INFO="Nightly ${{ needs.get_date.outputs.date }}"
201211
build_target: all
202212

203213
e2e-win:
@@ -215,7 +225,7 @@ jobs:
215225
target_devices: level_zero:gpu
216226

217227
- name: Intel L0 Arc GPU
218-
runner: '["Windows", arc"]'
228+
runner: '["Windows", "arc"]'
219229
target_devices: level_zero:gpu
220230

221231
- name: Intel L0 Battlemage GPU
@@ -358,7 +368,7 @@ jobs:
358368
nightly_build_upload:
359369
name: Nightly Build Upload
360370
if: ${{ github.ref_name == 'sycl' }}
361-
needs: [ubuntu2204_build, build-win]
371+
needs: [get_date, ubuntu2204_build, build-win]
362372
runs-on: ubuntu-latest
363373
permissions:
364374
contents: write
@@ -378,10 +388,10 @@ jobs:
378388
id: tag
379389
run: |
380390
if [ "${{ github.event_name == 'schedule' }}" == "true" ]; then
381-
echo "TAG=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
391+
echo "TAG=${{ needs.get_date.outputs.date }}" >> "$GITHUB_OUTPUT"
382392
else
383393
# TODO: Use date of the commit?
384-
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
394+
echo "TAG=${{ needs.get_date.outputs.date }}-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
385395
fi
386396
- name: Upload binaries
387397
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ name: SYCL Run Benchmarks
55

66
on:
77
schedule:
8-
# 3 hours ahead of SYCL nightly
9-
- cron: '0 0 * * *'
8+
# 2 hours after SYCL nightly
9+
- cron: '0 5 * * *'
1010
# Run on pull requests only when a benchmark-related files were changed.
1111
pull_request:
1212
# These paths are exactly the same as in sycl-linux/windows-precommit.yml (to ignore over there)
@@ -238,30 +238,14 @@ jobs:
238238
toolchain_decompress_command: ${{ needs.build_nightly.outputs.toolchain_decompress_command }}
239239
# END nightly benchmarking path
240240

241-
# Benchmark framework builds and runs on PRs path:
242-
build_pr:
243-
name: '[PR] Build SYCL'
244-
if: github.event_name == 'pull_request'
245-
uses: ./.github/workflows/sycl-linux-build.yml
246-
with:
247-
build_ref: ${{ github.sha }}
248-
build_cache_root: "/__w/"
249-
build_cache_suffix: "default"
250-
# Docker image has last nightly pre-installed and added to the PATH
251-
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
252-
cc: clang
253-
cxx: clang++
254-
changes: '[]'
255-
toolchain_artifact: sycl_linux_default
256-
241+
# BEGIN benchmark framework builds and runs on PRs path
257242
# TODO: When we have stable BMG runner(s), consider moving this job to that runner.
258243
test_benchmark_framework:
259244
name: '[PR] Benchmark suite testing'
260-
needs: [build_pr]
261245
permissions:
262246
contents: write
263247
packages: read
264-
if: ${{ !cancelled() && needs.build_pr.outputs.build_conclusion == 'success' }}
248+
if: github.event_name == 'pull_request'
265249
uses: ./.github/workflows/sycl-linux-run-tests.yml
266250
with:
267251
name: 'Framework test: PVC_PERF, L0, Minimal preset'
@@ -275,7 +259,4 @@ jobs:
275259
benchmark_dry_run: true
276260
benchmark_exit_on_failure: true
277261
repo_ref: ${{ github.sha }}
278-
toolchain_artifact: ${{ needs.build_pr.outputs.toolchain_artifact }}
279-
toolchain_artifact_filename: ${{ needs.build_pr.outputs.toolchain_artifact_filename }}
280-
toolchain_decompress_command: ${{ needs.build_pr.outputs.toolchain_decompress_command }}
281262
# END benchmark framework builds and runs on PRs path

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ jobs:
159159
shell: bash
160160
run: |
161161
cmake --build build --target ${{ inputs.build_target }}
162+
- run: build/bin/clang++ --version
162163
- name: check-llvm
163164
if: ${{ !cancelled() && contains(inputs.changes, 'llvm') }}
164165
shell: bash

buildbot/configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def do_configure(args, passthrough_args):
3232
libclc_nvidia_target_names = ";nvptx64--nvidiacl"
3333

3434
sycl_enable_jit = "OFF"
35-
if not args.disable_jit:
35+
if not args.disable_jit and sys.platform != "darwin":
3636
llvm_external_projects += ";sycl-jit"
3737
sycl_enable_jit = "ON"
3838

clang/include/clang/Basic/Version.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ namespace clang {
6666
/// the CL_SYCL_LANGUAGE_VERSION and SYCL_LANGUAGE_VERSION macros.
6767
llvm::SmallVector<std::pair<llvm::StringRef, llvm::StringRef>, 2>
6868
getSYCLVersionMacros(const LangOptions &LangOpts);
69+
70+
/// Retrieves a string representing the Intel SYCL compiler build info.
71+
std::string getSYCLBuildInfo();
6972
}
7073

7174
#endif // LLVM_CLANG_BASIC_VERSION_H

clang/include/clang/Options/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,12 +1342,12 @@ def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>,
13421342
def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>;
13431343

13441344
def offload_compress : Flag<["--"], "offload-compress">,
1345-
HelpText<"Compress offload device binaries (HIP only)">;
1345+
HelpText<"Compress offload device binaries (HIP and SYCL only)">;
13461346
def no_offload_compress : Flag<["--"], "no-offload-compress">;
13471347

13481348
def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">,
13491349
Flags<[HelpHidden]>,
1350-
HelpText<"Compression level for offload device binaries (HIP only)">;
1350+
HelpText<"Compression level for offload device binaries (HIP and SYCL only)">;
13511351

13521352
def offload_jobs_EQ : Joined<["--"], "offload-jobs=">,
13531353
HelpText<"Specify the number of threads to use for device offloading tasks "

clang/lib/Basic/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ add_custom_command(OUTPUT "${version_inc}"
4242
"-DLLVM_VC_REVISION=${llvm_vc_revision}"
4343
"-DLLVM_FORCE_VC_REVISION=${LLVM_FORCE_VC_REVISION}"
4444
"-DLLVM_FORCE_VC_REPOSITORY=${LLVM_FORCE_VC_REPOSITORY}"
45+
"-DSYCL_BUILD_INFO=${SYCL_BUILD_INFO}"
4546
-P "${generate_vcs_version_script}")
4647

4748
# Mark the generated header as being generated.

clang/lib/Basic/Version.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ std::string getClangVendor() {
6565
#endif
6666
}
6767

68+
std::string getSYCLBuildInfo() {
69+
#ifdef SYCL_BUILD_INFO
70+
return SYCL_BUILD_INFO;
71+
#else
72+
return "development";
73+
#endif
74+
}
75+
6876
std::string getClangFullRepositoryVersion() {
6977
std::string buf;
7078
llvm::raw_string_ostream OS(buf);

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,6 +2735,7 @@ void Driver::PrintSYCLToolHelp(const Compilation &C) const {
27352735
}
27362736

27372737
void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
2738+
OS << "Intel SYCL compiler " << getSYCLBuildInfo() << " build based on:\n";
27382739
if (IsFlangMode()) {
27392740
OS << getClangToolFullVersion("flang") << '\n';
27402741
} else {

0 commit comments

Comments
 (0)