Skip to content

Commit 466c3c1

Browse files
committed
Use build tree for cached Intel SYCL toolchain
1 parent e41e34f commit 466c3c1

2 files changed

Lines changed: 7 additions & 9 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/install
42-
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v1
41+
path: ${{ runner.temp }}/intel-nativecpu-toolchain/build
42+
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v2
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/install
81-
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v1
80+
path: ${{ runner.temp }}/intel-nativecpu-toolchain/build
81+
key: intel-nativecpu-toolchain-${{ env.INTEL_LLVM_TAG }}-v2
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: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

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

2727

2828
def linux_native_cpu_toolchain_ready(toolchain_root: Path) -> bool:
@@ -102,7 +102,7 @@ def build_linux_native_cpu_toolchain() -> Path:
102102

103103
toolchain_base = toolchain_root.parent
104104
source_dir = toolchain_base / "src"
105-
build_dir = toolchain_base / "build"
105+
build_dir = toolchain_root
106106
llvm_tag = require_env("INTEL_LLVM_TAG")
107107

108108
toolchain_base.mkdir(parents=True, exist_ok=True)
@@ -143,20 +143,18 @@ def build_linux_native_cpu_toolchain() -> Path:
143143
"-DCMAKE_CXX_COMPILER=g++-13",
144144
"-DCMAKE_C_COMPILER_LAUNCHER=ccache",
145145
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
146-
f"-DCMAKE_INSTALL_PREFIX={toolchain_root}",
147146
"-DSYCL_ENABLE_BACKENDS=native_cpu",
148147
"-DSYCL_INCLUDE_TESTS=OFF",
149148
"-DLLVM_INSTALL_UTILS=ON",
150149
]
151150
)
152151

153152
run(["cmake", "--build", str(build_dir), "--target", "sycl-toolchain", "--parallel"])
154-
run(["cmake", "--install", str(build_dir)])
155153

156154
if not linux_native_cpu_toolchain_ready(toolchain_root):
157155
main_error(
158156
"Intel SYCL native_cpu toolchain build completed, but required files "
159-
"were not installed"
157+
"were not produced in the build tree"
160158
)
161159

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

0 commit comments

Comments
 (0)