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

[cmake] add lapack,libmct,mklml third_party cache #54326

Merged
merged 8 commits into from
Jun 6, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Jun 3, 2023

PR types

Others

PR changes

Others

Description

添加lapack,libmct,mklml库编译缓存

相关链接:

@paddle-bot
Copy link

paddle-bot bot commented Jun 3, 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 contributor External developers status: proposed labels Jun 3, 2023
Comment on lines +18 to +19
set(LAPACK_DOWNLOAD_DIR
${PADDLE_SOURCE_DIR}/third_party/lapack/${CMAKE_SYSTEM_NAME})
Copy link
Member Author

Choose a reason for hiding this comment

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

这里是为了防止,有用户会在docker和本机同时编译所以在这里以系统分文件夹, 比如在macos同时使用docker和本机

目录结构

├── ...
└── lapack/
    ├── .../
    |── Darwin/
    |     ├── ...
    |     └──xxx.gz
    └── Linux/
         ├── ...
         └──xxx.gz

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a great idea, and we didn't think about that before

cmake/external/lapack.cmake Outdated Show resolved Hide resolved
Comment on lines +65 to +66
COMMAND ${CMAKE_COMMAND} -E copy ${LIBMCT_DOWNLOAD_DIR}/CMakeLists.txt
${LIBMCT_INSTALL_DIR}
Copy link
Member Author

Choose a reason for hiding this comment

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

这里用拷贝是因为当make -j时会清空build/third_parth/install/libmct文件夹

@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.

LGTM,there are some problems with the Coverage CI, but they are not caused by your PR.I helped you rerun , after CI passed to help you merge

Comment on lines +18 to +19
set(LAPACK_DOWNLOAD_DIR
${PADDLE_SOURCE_DIR}/third_party/lapack/${CMAKE_SYSTEM_NAME})
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a great idea, and we didn't think about that before

@gouzil
Copy link
Member Author

gouzil commented Jun 5, 2023

LGTM,there are some problems with the Coverage CI, but they are not caused by your PR.I helped you rerun , after CI passed to help you merge

If cross compilation is supported in the future, Then it is necessary to continue distinguishing between CPU architectures

risemeup1
risemeup1 previously approved these changes Jun 5, 2023
@@ -49,10 +50,10 @@ elseif(WIN32)
set(LAPACK_LIB "${LAPACK_LIB_DIR}/liblapack.dll")
else()
set(LAPACK_VER
Copy link
Contributor

Choose a reason for hiding this comment

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

这个如果把版本改成带后缀的文件名,那最好就换个变量名,比如LAPACK_FILE之类

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

PREFIX ${LAPACK_PREFIX_DIR}
DOWNLOAD_NO_PROGRESS 1
PATCH_COMMAND ""
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAPACK_SOURCE_DIR}
${LAPACK_LIB_DIR}
Copy link
Contributor

Choose a reason for hiding this comment

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

这个直接删除了没有影响吗?

Copy link
Member Author

@gouzil gouzil Jun 6, 2023

Choose a reason for hiding this comment

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

这里没问题,因为指定了SOURCE_DIR直接就解压到原先的LAPACK_LIB_DIR里面了

@risemeup1 risemeup1 merged commit f4a7b16 into PaddlePaddle:develop Jun 6, 2023
@gouzil gouzil deleted the migration_of_third_party branch September 24, 2023 14:42
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.

4 participants