New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update FG for latest paddle and cuda #6812
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6812 +/- ##
===========================================
- Coverage 59.92% 59.92% -0.01%
===========================================
Files 547 547
Lines 81009 81015 +6
===========================================
+ Hits 48546 48547 +1
- Misses 32463 32468 +5
|
paddlenlp/ops/ext_utils.py
Outdated
self.cmake_args += ["-DCMAKE_CXX_COMPILER={}".format(os.getenv("CXX_COMPILER_PATH"))] | ||
|
||
self.cmake_args += ["-DPYTHON_LIBRARY={}".format(distutils.sysconfig.get_config_var("LIBDIR"))] | ||
self.cmake_args += ["-DPYTHON_INCLUDE_DIR={}".format(distutils.sysconfig.get_python_inc())] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否可以直接使用sysconfig的一些方法拿到了,distutils之前因为deprecated有想要去掉
# copy form distutils.dep_util to avoid import distutils
def newer_group(sources, target, missing="error"):
"""Return true if 'target' is out-of-date with respect to any file
listed in 'sources'. In other words, if 'target' exists and is newer
than every file in 'sources', return false; otherwise return true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改,distutils.sysconfig功能已经导入sysconfig,直接使用import sysconfig并实现了相同输出
paddlenlp/ops/CMakeLists.txt
Outdated
GIT_TAG nccl_dependent_refine | ||
PREFIX ${THIRD_PATH} | ||
SOURCE_DIR ${THIRD_PATH}/source/${THIRD_PARTY_NAME} | ||
UPDATE_COMMAND ${FT_UPDATE_COMMAND} # PATCH_COMMAND ${FT_PATCH_COMMAND} | ||
BINARY_DIR ${THIRD_PATH}/build/${THIRD_PARTY_NAME} | ||
INSTALL_COMMAND "" | ||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DSM=${SM} -DBUILD_PD=ON -DBUILD_ENCODER=${WITH_ENCODER} -DPY_CMD=${PY_CMD} -DON_INFER=${ON_INFER} -DPADDLE_LIB=${PADDLE_LIB} -DWITH_MKL=${WITH_MKL} -DWITH_STATIC_LIB=${WITH_STATIC_LIB} -DBUILD_GPT=${WITH_PARALLEL} -DWITH_ONNXRUNTIME=${WITH_ONNXRUNTIME} | ||
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_C_COMPILER=/usr/local/gcc-12.2/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/gcc-12.2/bin/g++ -DSM=${SM} -DBUILD_PD=ON -DBUILD_ENCODER=${WITH_ENCODER} -DPY_CMD=${PY_CMD} -DON_INFER=${ON_INFER} -DPADDLE_LIB=${PADDLE_LIB} -DWITH_MKL=${WITH_MKL} -DWITH_STATIC_LIB=${WITH_STATIC_LIB} -DBUILD_GPT=${WITH_PARALLEL} -DWITH_ONNXRUNTIME=${WITH_ONNXRUNTIME} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的CMAKE_CXX_COMPILER
是否要明确写死这个路径了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修改,通过环境变量设置gcc和g++
PR types
Bug fixes
PR changes
Others
Description
CMakeList.txt
for latest paddle inference libary.paddlenlp/ops/fast_transformer/src/xxx.h
for latest paddle inference libary.codecvt
withutf8cpp
indemo/gpt.cc
, sincecodecvt
is deprecated in C++17.CMAKE_C_COMPILER
andCMAKE_CXX_COMPILER
inci_case.sh
to avoid system gcc 4.8.5 duringcmake
.This resolves #3522