Skip to content

Commit 7e1ac0a

Browse files
Merge remote-tracking branch 'origin/sycl' into HEAD
2 parents 422a2ac + 81bb879 commit 7e1ac0a

File tree

69 files changed

+2602
-882
lines changed

Some content is hidden

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

69 files changed

+2602
-882
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow checks for ready-to-merge PRs - if a PR is open, not a draft,
2+
# passed all checks, and has been approved, it will ping @intel/llvm-gatekeepers
3+
# if this group has not already been mentioned or if the last mention was more
4+
# than $days days ago.
5+
6+
name: Check ready-to-merge PRs
7+
8+
on:
9+
schedule:
10+
- cron: '0 * * * *' # every hour
11+
workflow_dispatch:
12+
13+
permissions: read-all
14+
15+
jobs:
16+
notify-ready-prs:
17+
permissions:
18+
pull-requests: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
# Number of days before repeating the gatekeepers ping
26+
days=3
27+
days_in_seconds=$((days*24*60*60))
28+
29+
# Function to ping gatekeepers and print debug info
30+
ping_gatekeepers() {
31+
pr_number=$1
32+
gh pr comment "$pr_number" --repo intel/llvm --body "@intel/llvm-gatekeepers please consider merging"
33+
echo "Pinged @intel/llvm-gatekeepers for https://github.com/intel/llvm/pull/$pr_number"
34+
}
35+
36+
# Get the list of suitable PRs
37+
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --repo intel/llvm --json number --jq '.[].number')
38+
now=$(date -u +%s)
39+
for pr in $prs; do
40+
# Get the timestamp of the latest comment mentioning @intel/llvm-gatekeepers
41+
latest_ts=$(gh pr view $pr --repo intel/llvm --json comments \
42+
--jq '[.comments[] | select(.body | test("@intel/llvm-gatekeepers")) | .createdAt] | last')
43+
# If there is no previous mention, ping the gatekeepers
44+
if [[ -z "$latest_ts" ]]; then
45+
ping_gatekeepers "$pr"
46+
# If the latest mention is older than $days, ping the gatekeepers again
47+
else
48+
comment_time=$(date -u -d "$latest_ts" +%s)
49+
age=$((now - comment_time))
50+
if (( age >= days_in_seconds )); then
51+
ping_gatekeepers "$pr"
52+
fi
53+
fi
54+
done

buildbot/configure.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ def do_configure(args, passthrough_args):
8282
if libclc_enabled:
8383
llvm_enable_projects += ";libclc"
8484

85+
# DeviceRTL uses -fuse-ld=lld, so enable lld.
86+
if args.offload:
87+
llvm_enable_projects += ";lld"
88+
sycl_enabled_backends.append("offload")
89+
8590
if args.cuda:
8691
llvm_targets_to_build += ";NVPTX"
8792
libclc_targets_to_build = libclc_nvidia_target_names
@@ -210,6 +215,12 @@ def do_configure(args, passthrough_args):
210215
"-DSYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB={}".format(sycl_preview_lib),
211216
"-DBUG_REPORT_URL=https://github.com/intel/llvm/issues",
212217
]
218+
if args.offload:
219+
cmake_cmd.extend(
220+
[
221+
"-DUR_BUILD_ADAPTER_OFFLOAD=ON",
222+
]
223+
)
213224

214225
if libclc_enabled:
215226
cmake_cmd.extend(
@@ -340,6 +351,11 @@ def main():
340351
default="AMD",
341352
help="choose hardware platform for HIP backend",
342353
)
354+
parser.add_argument(
355+
"--offload",
356+
action="store_true",
357+
help="Enable UR liboffload adapter (experimental)",
358+
)
343359
parser.add_argument(
344360
"--level_zero_adapter_version",
345361
type=str,

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ const char *SYCLInstallationDetector::findLibspirvPath(
6969
SmallString<128> LibraryPath(Path);
7070
llvm::sys::path::append(LibraryPath, a, b, c, Basename);
7171

72-
if (Args.hasArgNoClaim(options::OPT__HASH_HASH_HASH) ||
73-
D.getVFS().exists(LibraryPath))
72+
if (D.getVFS().exists(LibraryPath))
7473
return Args.MakeArgString(LibraryPath);
7574

7675
return nullptr;

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,16 @@
3434
// RUN: | FileCheck %s -DINSTALL_DIR=%{install_dir} -DRESOURCE_DIR=%{resource_dir} --check-prefixes=CHECK-DIR
3535
// CHECK-DIR: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-mlink-builtin-bitcode" "[[INSTALL_DIR]]{{.*[\\/]}}remangled-{{.*}}.libspirv-nvptx64-nvidia-cuda.bc"
3636
//
37-
// The `-###` option disables file existence checks
37+
// If libspirv path doesn't exist, error is reported.
3838
// DEFINE: %{nonexistent_dir} = %/S/Inputs/SYCL/does_not_exist/lib/clang/resource_dir
39-
// RUN: %clang -### -ccc-install-dir %{nonexistent_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib %s 2>&1 \
39+
// RUN: not %clang -### -ccc-install-dir %{nonexistent_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib %s 2>&1 \
4040
// RUN: | FileCheck %s -DDIR=%{nonexistent_dir} --check-prefixes=CHECK-HHH-NONEXISTENT
41-
// CHECK-HHH-NONEXISTENT: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-mlink-builtin-bitcode" "[[DIR]]{{.*[\\/]}}remangled-{{.*}}.libspirv-nvptx64-nvidia-cuda.bc"
41+
// CHECK-HHH-NONEXISTENT: error: cannot find 'remangled-{{.*}}.libspirv-nvptx64-nvidia-cuda.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
4242
//
43-
// RUN: %clang -### -ccc-install-dir %{nonexistent_dir} -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib %s 2>&1 \
43+
// RUN: not %clang -### -ccc-install-dir %{nonexistent_dir} -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx908 -nogpulib %s 2>&1 \
4444
// RUN: | FileCheck %s -DDIR=%{nonexistent_dir} --check-prefixes=CHECK-AMDGCN-HHH-NONEXISTENT
45-
// CHECK-AMDGCN-HHH-NONEXISTENT: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-mlink-builtin-bitcode" "[[DIR]]{{.*[\\/]}}remangled-{{.*}}.libspirv-amdgcn-amd-amdhsa.bc"
45+
// CHECK-AMDGCN-HHH-NONEXISTENT: clang: error: cannot find 'remangled-{{.*}}.libspirv-amdgcn-amd-amdhsa.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
4646
//
47-
// `-fdriver-only` has no such special handling, so it will not find the file
4847
// RUN: not %clang -fdriver-only -ccc-install-dir %{nonexistent_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib %s 2>&1 \
4948
// RUN: | FileCheck %s -DDIR=%{nonexistent_dir} --check-prefixes=CHECK-DO-NONEXISTENT
5049
// CHECK-DO-NONEXISTENT: error: cannot find 'remangled-{{.*}}.libspirv-nvptx64-nvidia-cuda.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clangxx -fsycl-device-only -fsycl-targets=native_cpu %s -### 2>&1 | FileCheck %s
2-
// RUN: %clangxx -fsycl-device-only -fsycl-targets=native_cpu --target=aarch64-unknown-linux-gnu %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-AARCH64
1+
// RUN: %clangxx -fsycl-device-only -fsycl-targets=native_cpu -fno-sycl-libspirv %s -### 2>&1 | FileCheck %s
2+
// RUN: %clangxx -fsycl-device-only -fsycl-targets=native_cpu --target=aarch64-unknown-linux-gnu -fno-sycl-libspirv %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-AARCH64
33

44

55
// checks that the host triple is native_cpu, the device triple is set, and that the sycl-native-cpu LLVM option is set
@@ -8,29 +8,29 @@
88
// checks that the target triples are set correctly when the target is set explicitly
99
// CHECK-AARCH64: clang{{.*}}"-triple" "native_cpu"{{.*}}"-aux-triple" "aarch64-unknown-linux-gnu" {{.*}}"-D" "__SYCL_NATIVE_CPU__"
1010

11-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl -fsycl-targets=native_cpu -g %s 2>&1 | FileCheck -check-prefix=CHECK-LINUX %s
11+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl -fsycl-targets=native_cpu -g -fno-sycl-libspirv %s 2>&1 | FileCheck -check-prefix=CHECK-LINUX %s
1212
// CHECK-LINUX: {{.*}}"-fsycl-is-device"{{.*}}"-dwarf-version=[[DVERSION:.*]]" "-debugger-tuning=gdb"
1313
// CHECK-LINUX-DAG: {{.*}}"-fsycl-is-host"{{.*}}"-dwarf-version=[[DVERSION]]" "-debugger-tuning=gdb"
1414
// CHECK-LINUX-NOT: codeview
1515

16-
// RUN: %clang -### --target=x86_64-windows-msvc -fsycl -fsycl-targets=native_cpu -g %s 2>&1 | FileCheck -check-prefix=CHECK-WIN %s
16+
// RUN: %clang -### --target=x86_64-windows-msvc -fsycl -fsycl-targets=native_cpu -g -fno-sycl-libspirv %s 2>&1 | FileCheck -check-prefix=CHECK-WIN %s
1717
// CHECK-WIN: {{.*}}"-fsycl-is-device"{{.*}}"-gcodeview"
1818
// CHECK-WIN-DAG: {{.*}}"-fsycl-is-host"{{.*}}"-gcodeview"
1919
// CHECK-WIN-NOT: dwarf
2020

2121
// checks that -sycl-opt is not enabled by default on NativeCPU so that the full llvm optimization is enabled
2222
// Also check that we pass the expected backend options.
23-
// RUN: %clang -fsycl -fsycl-targets=native_cpu --target=aarch64-unknown-linux-gnu -march=armv9.4-a -### %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s
23+
// RUN: %clang -fsycl -fsycl-targets=native_cpu --target=aarch64-unknown-linux-gnu -march=armv9.4-a -fno-sycl-libspirv -### %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s
2424
// CHECK-OPTS: clang{{.*}}"-triple" "native_cpu"{{.*}}"-aux-triple" "[[TRIPLE:[^"]*]]"
2525
// CHECK-OPTS: clang{{.*}}"-triple" "[[TRIPLE]]"{{.*}}"-fsycl-is-device"
2626
// CHECK-OPTS-NOT: -sycl-opt
2727
// CHECK-OPTS-SAME: "-Wno-override-module" "-mllvm" "-sycl-native-cpu-backend"
2828
// CHECK-OPTS-SAME: "-aux-target-feature" "+v9.4a"
2929

30-
// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -### 2>&1 | FileCheck -check-prefix=CHECK-NONATIVECPU %s
30+
// RUN: %clangxx -fsycl -fsycl-targets=spir64 -fno-sycl-libspirv %s -### 2>&1 | FileCheck -check-prefix=CHECK-NONATIVECPU %s
3131
// CHECK-NONATIVECPU-NOT: "-D" "__SYCL_NATIVE_CPU__"
3232

3333
// Checking that coverage testing options are accepted by native_cpu, and that device and host compilation invocations receive the same options
34-
// RUN: %clangxx -fsycl -fsycl-targets=native_cpu -Werror -fno-profile-instr-generate -fprofile-instr-generate -fno-coverage-mapping -fcoverage-mapping -### %s 2>&1 | FileCheck %s --check-prefix=CHECK_COV_INVO
34+
// RUN: %clangxx -fsycl -fsycl-targets=native_cpu -Werror -fno-profile-instr-generate -fprofile-instr-generate -fno-coverage-mapping -fcoverage-mapping -fno-sycl-libspirv -Wno-unsafe-libspirv-not-linked -### %s 2>&1 | FileCheck %s --check-prefix=CHECK_COV_INVO
3535
// CHECK_COV_INVO:{{.*}}clang{{.*}}"-fsycl-is-device"{{.*}} "-D" "__SYCL_NATIVE_CPU__"{{.*}}"-fprofile-instrument=clang"{{.*}}"-fcoverage-mapping" "-fcoverage-compilation-dir={{.*}}"
3636
// CHECK_COV_INVO:{{.*}}clang{{.*}}"-fsycl-is-host"{{.*}}"-fprofile-instrument=clang"{{.*}}"-fcoverage-mapping" "-fcoverage-compilation-dir={{.*}}"

devops/dependencies-igc-dev.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"linux": {
33
"igc_dev": {
4-
"github_tag": "igc-dev-47c1f6e",
5-
"version": "47c1f6e",
6-
"updated_at": "2025-08-20T15:46:36Z",
7-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/3810490997/zip",
4+
"github_tag": "igc-dev-46629d9",
5+
"version": "46629d9",
6+
"updated_at": "2025-08-30T10:44:04Z",
7+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/3889106305/zip",
88
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
99
}
1010
}

devops/dependencies.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2020
},
2121
"level_zero": {
22-
"github_tag": "v1.22.4",
23-
"version": "v1.22.4",
24-
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.22.4",
22+
"github_tag": "v1.24.2",
23+
"version": "v1.24.2",
24+
"url": "https://github.com/oneapi-src/level-zero/releases/tag/v1.24.2",
2525
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2626
},
2727
"tbb": {

devops/scripts/benchmarks/PERFORMANCE_TUNING.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,16 @@ For framework-specific information, see [README.md](README.md) and [CONTRIB.md](
66
## Table of Contents
77

88
- [Overview](#overview)
9-
- [System Configuration](#system-configuration)
109
- [CPU Tuning](#cpu-tuning)
1110
- [GPU Configuration](#gpu-configuration)
11+
- [Driver Version](#driver-version)
1212
- [Perf Configuration](#perf-configuration)
1313
- [Environment Variables](#environment-variables)
1414

1515
## Overview
1616

1717
Performance benchmarking requires a stable and optimized system environment to produce reliable and reproducible results. This guide covers essential system tuning steps for reducing run-to-run variance in benchmark results.
1818

19-
## System Configuration
20-
21-
### Kernel Parameters
22-
23-
Add the following to `/etc/default/grub` in `GRUB_CMDLINE_LINUX`:
24-
```
25-
# Disable CPU frequency scaling
26-
# intel_pstate=disable
27-
28-
# Isolate CPUs for benchmark workloads (example: reserve cores 2-7), preventing other processes
29-
# from using them.
30-
# isolcpus=2-7
31-
32-
GRUB_CMDLINE_LINUX="intel_pstate=disable isolcpus=2-7 <other_options>"
33-
```
34-
35-
Update GRUB and reboot:
36-
```bash
37-
sudo update-grub
38-
sudo reboot
39-
```
40-
4119
## CPU Tuning
4220

4321
### CPU Frequency Scaling
@@ -66,7 +44,7 @@ After=multi-user.target
6644
6745
[Service]
6846
Type=oneshot
69-
ExecStart=/usr/bin/cpupower frequency-set --governor performance && sysctl --system
47+
ExecStart=/usr/bin/cpupower frequency-set --governor performance
7048
7149
[Install]
7250
WantedBy=multi-user.target
@@ -99,7 +77,12 @@ cat /sys/class/drm/card1/device/vendor # Should be 0x8086 for Intel
9977
cat /sys/class/drm/card1/device/device # Device ID
10078
```
10179

102-
Verify the max frequency is set to the true max. For Arc B580, the maximum frequency is 2850 MHz. To see this value, run “cat /sys/class/drm/card1/device/tile0/gt0/freq0/max_freq”. If the above value is not equal to the max frequency, set it as such:
80+
Verify the max frequency is set to the true max. For Arc B580, the maximum frequency is 2850 MHz. To see this value, run:
81+
```bash
82+
cat /sys/class/drm/card1/device/tile0/gt0/freq0/max_freq
83+
```
84+
85+
If the above value is not equal to the max frequency, set it as such:
10386
```bash
10487
# Arc B580 (Battlemage)
10588
echo 2850 > /sys/class/drm/card1/device/tile0/gt0/freq0/max_freq
@@ -118,9 +101,9 @@ max_freq=$(cat /sys/class/drm/card1/gt_max_freq_mhz)
118101
echo $max_freq | sudo tee /sys/class/drm/card1/gt_min_freq_mhz
119102
```
120103

121-
The result can be verified using tools such as oneprof or unitrace to track frequency over time for some arbitrary benchmark (many iterations of a small problem size is recommended). The frequency should remain fixed assuming thermal throttling does not occur.
104+
The result can be verified using tools such as `oneprof` or `unitrace` to track frequency over time for some arbitrary benchmark (many iterations of a small problem size is recommended). The frequency should remain fixed assuming thermal throttling does not occur.
122105

123-
## Driver version
106+
## Driver Version
124107
Make sure you are using the latest driver (Ubuntu)
125108
```bash
126109
sudo apt update && sudo apt upgrade
@@ -145,6 +128,7 @@ Make the setting persistent across reboots by adding it to sysctl configuration:
145128
echo 'kernel.perf_event_paranoid = -1' | sudo tee -a /etc/sysctl.d/99-perf.conf
146129

147130
# Apply immediately
131+
sudo sysctl kernel.perf_event_paranoid=-1
148132
sudo sysctl -p
149133
```
150134

0 commit comments

Comments
 (0)