Skip to content

Commit 62f1b55

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
2 parents 4e8f753 + fa3d85f commit 62f1b55

Some content is hidden

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

48 files changed

+2022
-1149
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ jobs:
6969
with:
7070
build_ref: ${{ github.sha }}
7171
build_cache_root: "/__w/"
72-
build_artifact_suffix: "default"
73-
build_cache_suffix: "default"
72+
build_artifact_suffix: "ubuntu22"
73+
build_cache_suffix: "ubuntu22"
7474
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
7575
changes: ${{ needs.detect_changes.outputs.filters }}
7676

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5930,8 +5930,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
59305930
CmdArgs.push_back("-ffine-grained-bitfield-accesses");
59315931
}
59325932

5933-
if (!Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5934-
options::OPT_fno_sycl_unnamed_lambda, true))
5933+
// '-fsycl-unnamed-lambda' is not supported with '-fsycl-host-compiler'
5934+
if (Args.hasArg(options::OPT_fsycl_host_compiler_EQ)) {
5935+
if (Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5936+
options::OPT_fno_sycl_unnamed_lambda, false))
5937+
D.Diag(diag::err_drv_cannot_mix_options) << "-fsycl-host-compiler"
5938+
<< "-fsycl-unnamed-lambda";
5939+
else // '-fsycl-host-compiler' implies '-fno-sycl-unnamed-lambda'
5940+
CmdArgs.push_back("-fno-sycl-unnamed-lambda");
5941+
} else if (!Args.hasFlag(options::OPT_fsycl_unnamed_lambda,
5942+
options::OPT_fno_sycl_unnamed_lambda, true))
59355943
CmdArgs.push_back("-fno-sycl-unnamed-lambda");
59365944

59375945
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/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-b74b7ab",
5-
"version": "b74b7ab",
6-
"updated_at": "2025-04-02T18:41:33Z",
7-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2869865189/zip",
4+
"github_tag": "igc-dev-d1feb0f",
5+
"version": "d1feb0f",
6+
"updated_at": "2025-04-06T06:58:38Z",
7+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/2889443018/zip",
88
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
99
}
1010
}

devops/scripts/benchmarks/benches/compute.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def git_url(self) -> str:
4646
return "https://github.com/intel/compute-benchmarks.git"
4747

4848
def git_hash(self) -> str:
49-
return "b5cc46acf61766ab00da04e85bd4da4f7591eb21"
49+
return "c10baa895b4364899e253e44127ff128a8efa5d5"
5050

5151
def setup(self):
5252
if options.sycl is None:
@@ -145,7 +145,7 @@ def benchmarks(self) -> list[Benchmark]:
145145
benches.append(UllsKernelSwitch(self, runtime, 8, 200, 0, 0, 1, 1))
146146

147147
# Add GraphApiSubmitGraph benchmarks
148-
for runtime in self.enabled_runtimes([RUNTIMES.SYCL]):
148+
for runtime in self.enabled_runtimes([RUNTIMES.SYCL, RUNTIMES.UR]):
149149
for in_order_queue in [0, 1]:
150150
for num_kernels in [4, 10, 32]:
151151
for measure_completion_time in [0, 1]:

devops/scripts/benchmarks/benches/llamacpp.py

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def git_url(self) -> str:
2929
return "https://github.com/ggerganov/llama.cpp"
3030

3131
def git_hash(self) -> str:
32-
return "1ee9eea094fe5846c7d8d770aa7caa749d246b23"
32+
return "916c83bfe7f8b08ada609c3b8e583cf5301e594b"
3333

3434
def setup(self):
3535
if options.sycl is None:
@@ -47,9 +47,9 @@ def setup(self):
4747

4848
self.model = download(
4949
self.models_dir,
50-
"https://huggingface.co/microsoft/Phi-3-mini-4k-instruct-gguf/resolve/main/Phi-3-mini-4k-instruct-q4.gguf",
51-
"Phi-3-mini-4k-instruct-q4.gguf",
52-
checksum="fc4f45c9729874a33a527465b2ec78189a18e5726b7121182623feeae38632ace4f280617b01d4a04875acf49d263ee4",
50+
"https://huggingface.co/ggml-org/DeepSeek-R1-Distill-Qwen-1.5B-Q4_0-GGUF/resolve/main/deepseek-r1-distill-qwen-1.5b-q4_0.gguf",
51+
"deepseek-r1-distill-qwen-1.5b-q4_0.gguf",
52+
checksum="791f6091059b653a24924b9f2b9c3141c8f892ae13fff15725f77a2bf7f9b1b6b71c85718f1e9c0f26c2549aba44d191",
5353
)
5454

5555
self.oneapi = get_oneapi()
@@ -64,10 +64,11 @@ def setup(self):
6464
f"-DGGML_SYCL=ON",
6565
f"-DCMAKE_C_COMPILER=clang",
6666
f"-DCMAKE_CXX_COMPILER=clang++",
67-
f"-DDNNL_DIR={self.oneapi.dnn_cmake()}",
67+
f"-DDNNL_GPU_VENDOR=INTEL",
6868
f"-DTBB_DIR={self.oneapi.tbb_cmake()}",
69-
f'-DCMAKE_CXX_FLAGS=-I"{self.oneapi.mkl_include()}"',
70-
f"-DCMAKE_SHARED_LINKER_FLAGS=-L{self.oneapi.compiler_lib()} -L{self.oneapi.mkl_lib()}",
69+
f"-DDNNL_DIR={self.oneapi.dnn_cmake()}",
70+
f"-DSYCL_COMPILER=ON",
71+
f"-DMKL_DIR={self.oneapi.mkl_cmake()}",
7172
]
7273

7374
run(configure_command, add_sycl=True)
@@ -96,14 +97,17 @@ def __init__(self, bench):
9697
def setup(self):
9798
self.benchmark_bin = os.path.join(self.bench.build_path, "bin", "llama-bench")
9899

100+
def model(self):
101+
return "DeepSeek-R1-Distill-Qwen-1.5B-Q4_0.gguf"
102+
99103
def name(self):
100-
return f"llama.cpp"
104+
return f"llama.cpp {self.model()}"
101105

102106
def description(self) -> str:
103107
return (
104108
"Performance testing tool for llama.cpp that measures LLM inference speed in tokens per second. "
105109
"Runs both prompt processing (initial context processing) and text generation benchmarks with "
106-
"different batch sizes. Higher values indicate better performance. Uses the Phi-3-mini-4k-instruct "
110+
f"different batch sizes. Higher values indicate better performance. Uses the {self.model()} "
107111
"quantized model and leverages SYCL with oneDNN for acceleration."
108112
)
109113

@@ -122,12 +126,18 @@ def run(self, env_vars) -> list[Result]:
122126
"128",
123127
"-p",
124128
"512",
125-
"-b",
126-
"128,256,512",
129+
"-pg",
130+
"0,0",
131+
"-sm",
132+
"none",
133+
"-ngl",
134+
"99",
127135
"--numa",
128136
"isolate",
129137
"-t",
130-
"56", # TODO: use only as many threads as numa node 0 has cpus
138+
"8",
139+
"--mmap",
140+
"0",
131141
"--model",
132142
f"{self.bench.model}",
133143
]

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}",

devops/scripts/benchmarks/utils/oneapi.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,10 @@ def __init__(self):
1616
Path(self.oneapi_dir).mkdir(parents=True, exist_ok=True)
1717
self.oneapi_instance_id = self.generate_unique_oneapi_id(self.oneapi_dir)
1818

19-
# can we just hardcode these links?
2019
self.install_package(
21-
"dnnl",
22-
"https://registrationcenter-download.intel.com/akdlm/IRC_NAS/87e117ab-039b-437d-9c80-dcd5c9e675d5/intel-onednn-2025.0.0.862_offline.sh",
23-
"6866feb5b8dfefd6ff45d6bfabed44f01d7fba8fd452480ae1fd86b92e9481ae052c24842da14f112f672f5c4859945b",
24-
)
25-
self.install_package(
26-
"mkl",
27-
"https://registrationcenter-download.intel.com/akdlm/IRC_NAS/79153e0f-74d7-45af-b8c2-258941adf58a/intel-onemkl-2025.0.0.940_offline.sh",
28-
"122bb84cf943ea27753cb399c81ab2ae218ebd51b789c74d273240157722925ab4d5a43cb0b5de41b854f2c5a59a4002",
20+
"base",
21+
"https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cca951e1-31e7-485e-b300-fe7627cb8c08/intel-oneapi-base-toolkit-2025.1.0.651_offline.sh",
22+
"98cad2489f2c90a2b328568a59371cf35855a3338643f61a9fc2d16a265d29f22feb2d673916dd7be18fa12a5e6d2475",
2923
)
3024
return
3125

devops/scripts/benchmarks/utils/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
import subprocess
1010

1111
import tarfile
12-
import urllib # nosec B404
1312
from options import options
1413
from pathlib import Path
1514
import hashlib
15+
from urllib.request import urlopen # nosec B404
16+
from shutil import copyfileobj
1617

1718

1819
def run(
@@ -147,7 +148,9 @@ def download(dir, url, file, untar=False, unzip=False, checksum=""):
147148
data_file = os.path.join(dir, file)
148149
if not Path(data_file).exists():
149150
print(f"{data_file} does not exist, downloading")
150-
urllib.request.urlretrieve(url, data_file)
151+
with urlopen(url) as in_stream, open(data_file, "wb") as out_file:
152+
copyfileobj(in_stream, out_file)
153+
151154
calculated_checksum = calculate_checksum(data_file)
152155
if calculated_checksum != checksum:
153156
print(

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)