Skip to content

Commit dd75039

Browse files
author
Han Wang
committed
fix(ci): add install prefix to LD_LIBRARY_PATH for gen scripts
The custom op .so (libdeepmd_op_pt.so) has undefined symbols for compute kernels (tabulate_fusion_se_t_tebd_cpu etc.) that live in libdeepmd.so. Without dp_test/lib/ in LD_LIBRARY_PATH, dlopen succeeds (lazy binding) but torch.jit.script fails when it tries to resolve the symbols.
1 parent dd0b96a commit dd75039

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

source/install/test_cc_local.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ if [ -n "${_OP_SO}" ]; then
4545
cp "${_OP_SO}" "${_DEEPMD_LIB}/"
4646
fi
4747
fi
48+
# The custom op .so depends on libdeepmd.so (compute kernels). Add the
49+
# install prefix lib/ to LD_LIBRARY_PATH so dlopen can resolve symbols.
50+
export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}
4851
# When the build uses -fsanitize=leak, the custom op .so requires the LSAN
4952
# runtime to be preloaded (otherwise dlopen fails). We disable leak detection
5053
# in the gen scripts to avoid false reports from torch/paddle internals.

0 commit comments

Comments
 (0)