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