Skip to content

Commit c9f83fe

Browse files
committed
Use oneAPI compiler for Linux native CPU CI
1 parent e7741bc commit c9f83fe

2 files changed

Lines changed: 39 additions & 17 deletions

File tree

.github/workflows/sycl-ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
build-sycl-linux-x86:
1818
name: linux-x86_64 / ${{ matrix.build_type }}
1919
runs-on: ubuntu-latest
20-
container:
21-
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
22-
options: -u 0:0
2320
timeout-minutes: 360
2421
strategy:
2522
fail-fast: true

scripts/ci/sycl_x86_setup.py

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,47 @@ def setup_linux_runtime() -> None:
6666
"zstd",
6767
]
6868
)
69-
clang_path = Path(capture(["bash", "-lc", "readlink -f \"$(command -v clang++)\""]))
70-
candidate_roots = [
71-
clang_path.parent.parent,
72-
clang_path.parent.parent.parent,
73-
]
74-
sycl_root = next(
75-
(
76-
root
77-
for root in candidate_roots
78-
if (root / "bin").is_dir() or (root / "bin" / "compiler").is_dir()
69+
key_url = "https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB"
70+
key_path = Path(require_env("RUNNER_TEMP")) / "oneapi-intel-key.pub"
71+
armored_key_path = Path(require_env("RUNNER_TEMP")) / "oneapi-archive-keyring.gpg"
72+
download(key_url, key_path)
73+
run(
74+
[
75+
"gpg",
76+
"--dearmor",
77+
"--output",
78+
str(armored_key_path),
79+
str(key_path),
80+
]
81+
)
82+
run(
83+
[
84+
*command_prefix,
85+
"cp",
86+
str(armored_key_path),
87+
"/usr/share/keyrings/oneapi-archive-keyring.gpg",
88+
]
89+
)
90+
run(
91+
[*command_prefix, "tee", "/etc/apt/sources.list.d/oneAPI.list"],
92+
input_text=(
93+
"deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] "
94+
"https://apt.repos.intel.com/oneapi all main\n"
7995
),
80-
None,
8196
)
82-
if sycl_root is None:
83-
main_error(f"Unable to infer SYCL_ROOT from compiler path: {clang_path}")
84-
write_env("SYCL_ROOT", str(sycl_root))
97+
run([*command_prefix, "apt-get", "update"])
98+
run(
99+
[
100+
*command_prefix,
101+
"apt-get",
102+
"install",
103+
"-y",
104+
"intel-oneapi-compiler-dpcpp-cpp",
105+
]
106+
)
107+
108+
write_env("ITLABAI_GCC_INSTALL_DIR", "/usr/lib/gcc/x86_64-linux-gnu/13")
109+
write_env("SYCL_ROOT", "/opt/intel/oneapi/compiler/latest")
85110

86111

87112
def prepare_sycl_toolchain() -> Path:

0 commit comments

Comments
 (0)