Skip to content

Commit a3db9c9

Browse files
FrostMLZeyuChen
andauthored
[FasterTransformer] Fix compiling error by use abs path (PaddlePaddle#1051)
* fix cmake by use abs path * add boost dependency Co-authored-by: Zeyu Chen <[email protected]>
1 parent 6feb6d0 commit a3db9c9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

paddlenlp/ops/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ if(ON_INFER AND WITH_GPT AND WITH_SP)
305305
)
306306

307307
include_directories(
308-
${THIRD_PATH}/source/sentencepiece/src/
308+
${CMAKE_BINARY_DIR}/${THIRD_PATH}/source/sentencepiece/src/
309309
)
310310

311311
link_directories(
312-
${THIRD_PATH}/build/sentencepiece/src/
312+
${CMAKE_BINARY_DIR}/${THIRD_PATH}/build/sentencepiece/src/
313313
)
314314

315315
add_definitions(-DGPT_ON_SENTENCEPIECE)

paddlenlp/ops/faster_transformer/src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ if(ON_INFER)
146146
endif(NOT WIN32)
147147

148148
cuda_add_library(decoding_infer_op ${decoding_op_files} ${decoder_op_files} SHARED)
149-
add_dependencies(decoding_infer_op extern_${THIRD_PARTY_NAME})
149+
add_dependencies(decoding_infer_op extern_${THIRD_PARTY_NAME} boost)
150150

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

@@ -161,6 +161,7 @@ if(ON_INFER)
161161

162162
if(WITH_GPT AND WITH_SP)
163163
set(DEPS ${DEPS} sentencepiece)
164+
add_dependencies(decoding_infer_op extern_sentencepiece)
164165
endif()
165166

166167
if(WIN32)

0 commit comments

Comments
 (0)