Skip to content
This repository was archived by the owner on Jul 22, 2026. It is now read-only.

Commit 71dcbb6

Browse files
committed
Use Intel SYCL build tree directly in CI
1 parent e3591f6 commit 71dcbb6

2 files changed

Lines changed: 11 additions & 19 deletions

File tree

.github/workflows/sycl-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
- name: Restore Intel toolchain cache
3939
uses: actions/cache@v4
4040
with:
41-
path: ${{ runner.temp }}/intel-nativecpu-toolchain/toolchain
42-
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v3
41+
path: ${{ runner.temp }}/intel-nativecpu-toolchain/build
42+
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v4
4343

4444
- name: Prepare Intel native_cpu toolchain
4545
run: python3 ./scripts/ci/sycl_x86_setup.py linux-x86_64
@@ -77,8 +77,8 @@ jobs:
7777
- name: Restore Intel toolchain cache
7878
uses: actions/cache@v4
7979
with:
80-
path: ${{ runner.temp }}/intel-nativecpu-toolchain/toolchain
81-
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v3
80+
path: ${{ runner.temp }}/intel-nativecpu-toolchain/build
81+
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v4
8282

8383
- name: Prepare platform settings
8484
run: python3 ./scripts/ci/sycl_x86_setup.py linux-x86_64

scripts/ci/sycl_x86_setup.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@
2222

2323

2424
def linux_native_cpu_toolchain_root() -> Path:
25-
return Path(require_env("RUNNER_TEMP")) / "intel-nativecpu-toolchain" / "toolchain"
25+
return Path(require_env("RUNNER_TEMP")) / "intel-nativecpu-toolchain" / "build"
2626

2727

2828
def linux_native_cpu_toolchain_ready(toolchain_root: Path) -> bool:
2929
if not toolchain_root.exists():
3030
return False
31-
compiler_candidates = [toolchain_root / "bin" / "clang++"]
31+
compiler_candidates = [
32+
toolchain_root / "bin" / "clang++",
33+
toolchain_root / "bin" / "compiler" / "clang++",
34+
]
3235
has_compiler = any(path.exists() for path in compiler_candidates)
3336
has_runtime = find_file([toolchain_root], "libsycl.so") is not None or find_file(
3437
[toolchain_root], "libsycl.so.9"
@@ -109,7 +112,7 @@ def build_linux_native_cpu_toolchain() -> Path:
109112

110113
toolchain_base = toolchain_root.parent
111114
source_dir = toolchain_base / "src"
112-
build_dir = toolchain_base / "build"
115+
build_dir = toolchain_root
113116
llvm_tag = require_env("INTEL_LLVM_TAG")
114117

115118
toolchain_base.mkdir(parents=True, exist_ok=True)
@@ -152,7 +155,6 @@ def build_linux_native_cpu_toolchain() -> Path:
152155
"-DCMAKE_CXX_COMPILER=g++-13",
153156
"-DCMAKE_C_COMPILER_LAUNCHER=ccache",
154157
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
155-
f"-DCMAKE_INSTALL_PREFIX={toolchain_root}",
156158
"-DSYCL_ENABLE_BACKENDS=native_cpu",
157159
"-DSYCL_INCLUDE_TESTS=OFF",
158160
"-DLLVM_INSTALL_UTILS=ON",
@@ -161,21 +163,11 @@ def build_linux_native_cpu_toolchain() -> Path:
161163
)
162164

163165
run(["cmake", "--build", str(build_dir), "--target", "sycl-toolchain", "--parallel"])
164-
run(
165-
[
166-
"cmake",
167-
"--install",
168-
str(build_dir / "runtimes" / "runtimes-bins"),
169-
"--prefix",
170-
str(toolchain_root),
171-
]
172-
)
173-
run(["cmake", "--build", str(build_dir), "--target", "deploy-sycl-toolchain", "--parallel"])
174166

175167
if not linux_native_cpu_toolchain_ready(toolchain_root):
176168
main_error(
177169
"Intel SYCL native_cpu toolchain build completed, but required files "
178-
"were not deployed into the toolchain directory"
170+
"were not produced in the build tree"
179171
)
180172

181173
write_env("SYCL_ROOT", str(toolchain_root))

0 commit comments

Comments
 (0)