@@ -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
87112def prepare_sycl_toolchain () -> Path :
0 commit comments