-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Merged
Merged
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fff8322
fix FG for new paddle and cuda env
DrownFish19 64ecbea
update ci_case
DrownFish19 446f521
Merge branch 'PaddlePaddle:develop' into dev-fixFG
DrownFish19 8b713cd
open fast_gpt
DrownFish19 a0292b2
update modeling and ci
DrownFish19 08ccfd1
update ci_case.sh
DrownFish19 9074f73
Merge branch 'PaddlePaddle:develop' into dev-fixFG
DrownFish19 b31e81e
update for FG
DrownFish19 7ccec83
fix ci
DrownFish19 97bedc3
fix ci
DrownFish19 39f2ad7
fix FasterTransformer
DrownFish19 fd8dfb4
Merge branch 'PaddlePaddle:develop' into dev-fixFG
DrownFish19 d521923
update include file
DrownFish19 d44f30d
update setup method
DrownFish19 9c45846
update
DrownFish19 34a656e
update ci
DrownFish19 f993529
update
DrownFish19 a996415
remove C_COMPILER_PATH from cmakelist.txt and .py
DrownFish19 b786b1c
Merge remote-tracking branch 'paddlenlp/develop' into dev-fixFG
DrownFish19 713a310
update ci
DrownFish19 4e3d473
Merge branch 'PaddlePaddle:develop' into dev-fixFG
DrownFish19 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import distutils | ||
import functools | ||
import hashlib | ||
import os | ||
|
@@ -144,6 +145,8 @@ | |
# CMake 3.12+ only. | ||
build_args += ["-j{}".format(ext_builder.parallel)] | ||
|
||
build_args += ["-j14"] | ||
|
||
if not os.path.exists(ext_builder.build_temp): | ||
os.makedirs(ext_builder.build_temp) | ||
|
||
|
@@ -198,9 +201,17 @@ | |
# `GetCUDAComputeCapability` is not exposed yet, and detect CUDA/GPU | ||
# version in cmake file. | ||
# self.cmake_args += [f"-DSM={self.sm}"] if self.sm is not None else [] | ||
self.cmake_args += ["-DWITH_GPT=ON"] | ||
self.cmake_args += "-DWITH_GPT=ON -DON_INFER=OFF -DWITH_MKL=ON -DWITH_ONNXRUNTIME=ON".split() | ||
|
||
self.cmake_args += ["-DCMAKE_C_COMPILER={}".format(os.getenv("C_COMPILER_PATH"))] | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 已经修改,distutils.sysconfig功能已经导入sysconfig,直接使用import sysconfig并实现了相同输出 |
||
|
||
if self.need_parallel: | ||
self.cmake_args += ["-DWITH_PARALLEL=ON"] | ||
|
||
try: | ||
super(FasterTransformerExtension, self).build_with_command(ext_builder) | ||
# FastGeneration cmake file resets `CMAKE_LIBRARY_OUTPUT_DIRECTORY` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2006 Nemanja Trifunovic | ||
|
||
/* | ||
Permission is hereby granted, free of charge, to any person or organization | ||
obtaining a copy of the software and accompanying documentation covered by | ||
this license (the "Software") to use, reproduce, display, distribute, | ||
execute, and transmit the Software, and to prepare derivative works of the | ||
Software, and to permit third-parties to whom the Software is furnished to | ||
do so, all subject to the following: | ||
|
||
The copyright notices in the Software and this entire statement, including | ||
the above license grant, this restriction and the following disclaimer, | ||
must be included in all copies of the Software, in whole or in part, and | ||
all derivative works of the Software, unless such copies or derivative | ||
works are solely in the form of machine-executable object code generated by | ||
a source language processor. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | ||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | ||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
|
||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 | ||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 | ||
|
||
#include "utf8/checked.h" | ||
#include "utf8/unchecked.h" | ||
|
||
#endif // header guard |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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++