Skip to content
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 12 commits into from
Jun 6, 2023

Conversation

huangjiyi
Copy link
Member

PR types

Others

PR changes

Others

Description

@paddle-bot
Copy link

paddle-bot bot commented Jun 4, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Jun 4, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jun 5, 2023
Copy link
Contributor

@risemeup1 risemeup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI没过呢

@huangjiyi
Copy link
Member Author

CI没过呢

正在修复 ...

@huangjiyi
Copy link
Member Author

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)
# 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()

image

@risemeup1,我看任务说明里 cub 的 tag 和原始代码里的 tag 有区别,并且 cub repository 好像没有 1.18.0 的 tag,帮忙看下要怎么处理

@risemeup1
Copy link
Contributor

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)
# 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()

image

@risemeup1,我看任务说明里 cub 的 tag 和原始代码里的 tag 有区别,并且 cub repository 好像没有 1.18.0 的 tag,帮忙看下要怎么处理

直接以.cmake文件里的为准,任务说明里是之前统计的,可能更新了,也可能是我写错了。

Comment on lines 27 to 36
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()
Copy link
Member Author

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 分支的话会执行命令切换

Copy link
Contributor

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 分支的话会执行命令切换

# 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方是否有问题?源码目录下应该没有src/extern_cub目录

Copy link
Member Author

@huangjiyi huangjiyi Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,因为原来的代码 git clone 的目录是 third_party/cub/src/extern_cub,这里直接把 CUB_INCLUDE_DIR 改为
${CUB_SOURCE_DIR} 就好了

@huangjiyi
Copy link
Member Author

@risemeup1,帮忙 Review 一下

Copy link
Contributor

@risemeup1 risemeup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@risemeup1 risemeup1 merged commit 33e7a46 into PaddlePaddle:develop Jun 6, 2023
@risemeup1 risemeup1 mentioned this pull request Jun 6, 2023
@huangjiyi huangjiyi deleted the add_submodule branch January 9, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants