Skip to content

Commit

Permalink
[FasterTransformer] Fix compiling error by use abs path (PaddlePaddle…
Browse files Browse the repository at this point in the history
…#1051)

* fix cmake by use abs path

* add boost dependency

Co-authored-by: Zeyu Chen <[email protected]>
  • Loading branch information
FrostML and ZeyuChen authored Sep 17, 2021
1 parent 6feb6d0 commit a3db9c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions paddlenlp/ops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ if(ON_INFER AND WITH_GPT AND WITH_SP)
)

include_directories(
${THIRD_PATH}/source/sentencepiece/src/
${CMAKE_BINARY_DIR}/${THIRD_PATH}/source/sentencepiece/src/
)

link_directories(
${THIRD_PATH}/build/sentencepiece/src/
${CMAKE_BINARY_DIR}/${THIRD_PATH}/build/sentencepiece/src/
)

add_definitions(-DGPT_ON_SENTENCEPIECE)
Expand Down
3 changes: 2 additions & 1 deletion paddlenlp/ops/faster_transformer/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ if(ON_INFER)
endif(NOT WIN32)

cuda_add_library(decoding_infer_op ${decoding_op_files} ${decoder_op_files} SHARED)
add_dependencies(decoding_infer_op extern_${THIRD_PARTY_NAME})
add_dependencies(decoding_infer_op extern_${THIRD_PARTY_NAME} boost)

string(REPLACE "/" ";" DEMO_PATH ${DEMO})

Expand All @@ -161,6 +161,7 @@ if(ON_INFER)

if(WITH_GPT AND WITH_SP)
set(DEPS ${DEPS} sentencepiece)
add_dependencies(decoding_infer_op extern_sentencepiece)
endif()

if(WIN32)
Expand Down

0 comments on commit a3db9c9

Please sign in to comment.