From 8f729b07339240b596d528cb4eb672e61f4eaba1 Mon Sep 17 00:00:00 2001 From: Michel Schanen Date: Mon, 26 Oct 2026 14:14:40 +0000 Subject: [PATCH] CI: build the support library with the Conda compiler (backport of #636) A bare `icpx` resolves to the site oneAPI installation when one is on PATH, which links the support library against that installation's libsycl instead of the Conda toolkit the RPATH points at. On Aurora this fails with `undefined reference to ur*Exp@LIBUR_LOADER_0.12` in the `build:support` job. The test job also drops the site oneAPI entries from LD_LIBRARY_PATH so SYCL is pure Conda, as on main. Only the two CI hunks of #636 are backported; the oneMKL 2026.1.0 wrapper bump stays on main. (cherry picked from commit 5093529311e36f530c5990e4b0b3669452c45d8c) --- .gitlab-ci.yml | 6 ++++++ deps/build_local.jl | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 095f176e1..765826e36 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,6 +99,12 @@ test:lts: # them (ONEAPI_TEST_SPREAD_GPUS, see test/runtests.jl). ONEAPI_SYNC_EACH_SUBMISSION # works around the Aurora LTS NEO dropped-tail corruption (lib/level-zero/cmdlist.jl). - export ZE_FLAT_DEVICE_HIERARCHY=FLAT ONEAPI_LTS=1 ONEAPI_TEST_SPREAD_GPUS=1 ONEAPI_SYNC_EACH_SUBMISSION=1 + # The support library's RUNPATH points at the Conda toolkit it was built with, but + # LD_LIBRARY_PATH wins over RUNPATH, so the site oneAPI module would substitute its + # own libur_adapter_level_zero/libumf (same sonames across releases) underneath the + # Conda libsycl. Any version mismatch between the two aborts in + # sycl::platform::get_platforms; drop the site oneAPI entries so SYCL is pure Conda. + - export LD_LIBRARY_PATH="$(echo "${LD_LIBRARY_PATH:-}" | tr ':' '\n' | grep -v '^/opt/aurora/[^/]*/oneapi/' | paste -sd:)" # -C on the command line, not just the JULIA_CPU_TARGET variable: the variable # selects pkgimages but does not constrain the runtime JIT, and the AVX512-FP16 # host-Float16 miscompile (broadcast Float16 reference failure, see ci.yml) needs diff --git a/deps/build_local.jl b/deps/build_local.jl index 2e9eadb7a..8d6431024 100644 --- a/deps/build_local.jl +++ b/deps/build_local.jl @@ -75,11 +75,15 @@ Conda.list(conda_dir) include_dir = joinpath(oneAPI_Level_Zero_Headers_jll.artifact_dir, "include") # build and install +# use the Conda compiler and libraries explicitly: a bare `icpx` resolves to a system +# oneAPI installation when one is on PATH (e.g. a site module), which then links against +# that installation's libsycl/oneMKL instead of the Conda toolkit the RPATH points at. withenv("PATH"=>"$(ENV["PATH"]):$(Conda.bin_dir(conda_dir))", - "LD_LIBRARY_PATH"=>Conda.lib_dir(conda_dir)) do + "LD_LIBRARY_PATH"=>Conda.lib_dir(conda_dir), + "LIBRARY_PATH"=>Conda.lib_dir(conda_dir)) do cmake() do cmake_path ninja() do ninja_path - run(```$cmake_path -DCMAKE_CXX_COMPILER="icpx" + run(```$cmake_path -DCMAKE_CXX_COMPILER="$(Conda.bin_dir(conda_dir))/icpx" -DCMAKE_CXX_FLAGS="-fsycl -isystem $(conda_dir)/include -isystem $include_dir -fdiagnostics-color=always" -DCMAKE_INSTALL_RPATH=$(Conda.lib_dir(conda_dir)) -DCMAKE_INSTALL_PREFIX=$install_dir