From 939c584e50d65b4edf322e64b180efc7a2c167e6 Mon Sep 17 00:00:00 2001 From: FrostML <380185688@qq.com> Date: Tue, 25 Oct 2022 03:08:09 +0000 Subject: [PATCH] add support for libpaddle.so --- .../ops/faster_transformer/src/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/paddlenlp/ops/faster_transformer/src/CMakeLists.txt b/paddlenlp/ops/faster_transformer/src/CMakeLists.txt index 46588a22151a..46d292a5ca84 100644 --- a/paddlenlp/ops/faster_transformer/src/CMakeLists.txt +++ b/paddlenlp/ops/faster_transformer/src/CMakeLists.txt @@ -272,21 +272,22 @@ else(ON_INFER) ) endif() - if(EXISTS ${PY_LIB_DIR}/../fluid/core_avx.so) + if(EXISTS ${PY_LIB_DIR}/../fluid/libpaddle.so) set(lib_link - -l:core_avx.so + -lpaddle ) - link_directories( - ${PY_LIB_DIR}/../fluid/ + elseif(EXISTS ${PY_LIB_DIR}/../fluid/core_avx.so) + set(lib_link + -l:core_avx.so ) else() set(lib_link -l:core_noavx.so ) - link_directories( - ${PY_LIB_DIR}/../fluid/ - ) endif() + link_directories( + ${PY_LIB_DIR}/../fluid/ + ) set(ft_lib_link -ldecoder -ldecoding -ltopk -lcuda_int8_kernels -lcuda_kernels -lonline_softmax_beamsearch -ltransformer_kernels -lattention_kernels -lencoder -lnccl_utils -lnvtx_utils