@@ -94,7 +94,16 @@ def setup_linux_runtime() -> None:
9494 ),
9595 )
9696 run (["sudo" , "apt-get" , "update" ])
97- run (["sudo" , "apt-get" , "install" , "-y" , "intel-oneapi-runtime-opencl" ])
97+ run (
98+ [
99+ "sudo" ,
100+ "apt-get" ,
101+ "install" ,
102+ "-y" ,
103+ "intel-oneapi-compiler-dpcpp-cpp" ,
104+ "intel-oneapi-runtime-opencl" ,
105+ ]
106+ )
98107
99108 write_env ("ITLABAI_GCC_INSTALL_DIR" , "/usr/lib/gcc/x86_64-linux-gnu/13" )
100109
@@ -186,12 +195,34 @@ def setup_windows_compilers(sycl_root: Path) -> None:
186195
187196
188197def setup_unix_compilers (sycl_root : Path ) -> None :
189- cc_path = find_first_existing ([sycl_root / "bin" / "icx" , sycl_root / "bin" / "clang" ])
190- cxx_path = find_first_existing ([sycl_root / "bin" / "icpx" , sycl_root / "bin" / "clang++" ])
198+ cc_candidates = [sycl_root / "bin" / "icx" , sycl_root / "bin" / "clang" ]
199+ cxx_candidates = [sycl_root / "bin" / "icpx" , sycl_root / "bin" / "clang++" ]
200+ prefix_paths = [sycl_root ]
201+
202+ if require_env ("RUNNER_OS" ) == "Linux" :
203+ compiler_root = Path ("/opt/intel/oneapi/compiler/latest" )
204+ cc_candidates = [
205+ compiler_root / "bin" / "compiler" / "icx" ,
206+ compiler_root / "bin" / "compiler" / "clang" ,
207+ * cc_candidates ,
208+ ]
209+ cxx_candidates = [
210+ compiler_root / "bin" / "compiler" / "icpx" ,
211+ compiler_root / "bin" / "compiler" / "clang++" ,
212+ * cxx_candidates ,
213+ ]
214+ prefix_paths = [compiler_root , sycl_root ]
215+
216+ cc_path = find_first_existing (cc_candidates )
217+ cxx_path = find_first_existing (cxx_candidates )
191218
192219 write_env ("ITLABAI_CC" , str (cc_path ))
193220 write_env ("ITLABAI_CXX" , str (cxx_path ))
194- write_env ("ITLABAI_CMAKE_PREFIX_PATH" , str (sycl_root ))
221+ write_env (
222+ "ITLABAI_CMAKE_PREFIX_PATH" ,
223+ ":" .join (str (path ) for path in prefix_paths if path .exists ()),
224+ )
225+ append_path (str (cc_path .parent ))
195226 append_path (str (sycl_root / "bin" ))
196227
197228 if require_env ("RUNNER_OS" ) == "Linux" :
0 commit comments