Skip to content

Commit 335cc4c

Browse files
committed
Align x86 SYCL CI targets and OpenMP headers
1 parent e0609d0 commit 335cc4c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

scripts/ci/sycl_x86_setup.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def configure_platform(platform: str) -> None:
5555
"toolchain_asset": "sycl_windows.tar.gz",
5656
"device_selector": "opencl:cpu",
5757
"opencv_apps": "ON",
58-
"sycl_targets": "spir64",
58+
"sycl_targets": "spir64_x86_64",
5959
},
6060
}.get(platform)
6161

@@ -214,17 +214,17 @@ def setup_windows_compilers(sycl_root: Path) -> None:
214214
cc_path = find_first_existing(
215215
[
216216
sycl_root / "bin" / "icx.exe",
217-
sycl_root / "bin" / "clang.exe",
218217
sycl_root / "bin" / "icx-cl.exe",
219218
sycl_root / "bin" / "clang-cl.exe",
219+
sycl_root / "bin" / "clang.exe",
220220
]
221221
)
222222
cxx_path = find_first_existing(
223223
[
224224
sycl_root / "bin" / "icpx.exe",
225-
sycl_root / "bin" / "clang++.exe",
226225
sycl_root / "bin" / "icx-cl.exe",
227226
sycl_root / "bin" / "clang-cl.exe",
227+
sycl_root / "bin" / "clang++.exe",
228228
]
229229
)
230230

@@ -275,6 +275,7 @@ def setup_unix_compilers(sycl_root: Path) -> None:
275275
append_path(str(sycl_root / "bin"))
276276

277277
if require_env("RUNNER_OS") == "Linux":
278+
export_openmp_include_dir = True
278279
openmp_library = find_file([sycl_root, Path("/opt/intel/oneapi")], "libiomp5.so")
279280
openmp_library_name = "iomp5"
280281
openmp_flags = "-fopenmp=libiomp5"
@@ -291,6 +292,7 @@ def setup_unix_compilers(sycl_root: Path) -> None:
291292
openmp_library = gcc_openmp_library
292293
openmp_library_name = "gomp"
293294
openmp_flags = "-fopenmp=libgomp"
295+
export_openmp_include_dir = False
294296
if openmp_library is None and not source_built_linux_toolchain:
295297
main_error("Unable to locate an Intel toolchain OpenMP runtime library")
296298

@@ -306,16 +308,18 @@ def setup_unix_compilers(sycl_root: Path) -> None:
306308
if openmp_header is None and source_built_linux_toolchain:
307309
gcc_root = Path(require_env("ITLABAI_GCC_INSTALL_DIR"))
308310
openmp_header = find_file([gcc_root / "include"], "omp.h")
311+
export_openmp_include_dir = False
309312
if openmp_header is None and not source_built_linux_toolchain:
310313
main_error(
311314
"Unable to locate Intel-provided omp.h under the SYCL toolchain"
312315
)
313316

314-
if openmp_library is not None and openmp_header is not None:
317+
if openmp_library is not None:
315318
write_env("ITLABAI_OPENMP_FLAGS", openmp_flags)
316319
write_env("ITLABAI_OPENMP_LIBRARY_NAME", openmp_library_name)
317320
write_env("ITLABAI_OPENMP_LIBRARY", str(openmp_library))
318-
write_env("ITLABAI_OPENMP_INCLUDE_DIR", str(openmp_header.parent))
321+
if openmp_header is not None and export_openmp_include_dir:
322+
write_env("ITLABAI_OPENMP_INCLUDE_DIR", str(openmp_header.parent))
319323

320324
libsycl = find_file(library_roots + [sycl_root], "libsycl.so.8")
321325
if libsycl is None:

0 commit comments

Comments
 (0)