Skip to content

Commit 277bbaf

Browse files
naxingyudanpovey
authored andcommitted
[build] Source LD_PRELOAD in env.sh and source env.sh during build, for MKL
1 parent e05890d commit 277bbaf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/pybind/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ test: all
119119
make -C chain test
120120
make -C cudamatrix test
121121
make -C dlpack test
122+
$(eval include ../../tools/env.sh)
122123
make -C feat test
123124
make -C fst test
124125
make -C matrix test

tools/extras/install_mkl.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,15 @@ ConfigLdSo() {
254254
ldconfig )
255255
}
256256
257+
# Load MKL libraris, which is need for pybind tests to pass
258+
(
259+
echo "export LD_PRELOAD:=/opt/intel/mkl/lib/intel64/libmkl_def.so:\
260+
/opt/intel/mkl/lib/intel64/libmkl_avx2.so:\
261+
/opt/intel/mkl/lib/intel64/libmkl_core.so:\
262+
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:\
263+
/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so"
264+
) >> env.sh
265+
257266
# Invoke installation.
258267
if Install_${distro} && ConfigLdSo; then
259268
echo >&2 "$0: MKL package $package was successfully installed"

0 commit comments

Comments
 (0)