-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
support offline compilation for third-party snappy, cub and cutlass #54335
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
289169e
update
huangjiyi 83b69f3
update
huangjiyi 5fa0466
update
huangjiyi 68e78a0
update
huangjiyi 685ea63
update tag
huangjiyi 4ad429a
fix cutlass
huangjiyi 4285850
update cub tag
huangjiyi 04837f4
Merge branch 'develop' into add_submodule
huangjiyi 7a3e60e
update
huangjiyi 3ee1b77
update
huangjiyi 4dac502
Merge branch 'add_submodule' of https://github.com/huangjiyi/Paddle i…
huangjiyi 5d09ecd
Merge branch 'PaddlePaddle:develop' into add_submodule
huangjiyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 |
---|---|---|
|
@@ -22,26 +22,27 @@ set(CUB_PATH | |
CACHE STRING "A path setting for external_cub path.") | ||
set(CUB_PREFIX_DIR ${CUB_PATH}) | ||
|
||
set(CUB_REPOSITORY ${GIT_URL}/NVlabs/cub.git) | ||
set(CUB_SOURCE_DIR ${PADDLE_SOURCE_DIR}/third_party/cub) | ||
|
||
if(${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6) | ||
# cuda_11.6/11.7/11.8‘s own cub is 1.15.0, which will cause compiling error in windows. | ||
set(CUB_TAG 1.16.0) | ||
execute_process(COMMAND git --git-dir=${CUB_SOURCE_DIR}/.git | ||
--work-tree=${CUB_SOURCE_DIR} checkout ${CUB_TAG}) | ||
# cub 1.16.0 is not compitable with current thrust version | ||
add_definitions(-DTHRUST_IGNORE_CUB_VERSION_CHECK) | ||
else() | ||
set(CUB_TAG 1.8.0) | ||
endif() | ||
|
||
set(CUB_INCLUDE_DIR ${CUB_PREFIX_DIR}/src/extern_cub) | ||
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. 这个地方是否有问题?源码目录下应该没有src/extern_cub目录 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. 已修改,因为原来的代码 git clone 的目录是 |
||
set(CUB_INCLUDE_DIR ${CUB_SOURCE_DIR}/src/extern_cub) | ||
message("CUB_INCLUDE_DIR is ${CUB_INCLUDE_DIR}") | ||
include_directories(${CUB_INCLUDE_DIR}) | ||
|
||
ExternalProject_Add( | ||
extern_cub | ||
${EXTERNAL_PROJECT_LOG_ARGS} ${SHALLOW_CLONE} | ||
GIT_REPOSITORY ${CUB_REPOSITORY} | ||
GIT_TAG ${CUB_TAG} | ||
${EXTERNAL_PROJECT_LOG_ARGS} | ||
SOURCE_DIR ${CUB_SOURCE_DIR} | ||
PREFIX ${CUB_PREFIX_DIR} | ||
UPDATE_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
|
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
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.
PR 里提交的 commit 是 1.8.0 分支,所以默认下载的是 1.8.0,然后如果需要 1.16.0 分支的话会执行命令切换
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.