From 27ebe7b0ae768949a775fbd214b7b018d9e0cbf1 Mon Sep 17 00:00:00 2001 From: Alexis Montoison Date: Tue, 18 Apr 2023 17:23:16 -0400 Subject: [PATCH] Load the symbols of BLIS when we use BLIS.jl --- src/BLIS.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/BLIS.jl b/src/BLIS.jl index a1e32c9..e44a54e 100644 --- a/src/BLIS.jl +++ b/src/BLIS.jl @@ -8,15 +8,18 @@ using LinearAlgebra global libblis = C_NULL __init__() = begin - if length(get(ENV, "BLISDIR", "")) > 0 + if haskey(ENV, "BLISDIR") + blis_path = joinpath(ENV["BLISDIR"], "lib", "libblis.$dlext") # BLIS installation overriden by environmental variables. @info "Using custom defined BLIS installation instead of blis_jll." - global libblis = dlopen(string(get(ENV, "BLISDIR", ""), "/lib/libblis")) + global libblis = dlopen(blis_path) + BLAS.lbt_forward(blis_path) else blis_path = blis_jll.blis_path # Use BinaryBuilder provided BLIS library. @info "blis_jll yields BLIS installation: $blis_path." global libblis = dlopen(blis_path) + BLAS.lbt_forward(blis_path) end end