FlashAttention build skip when bos has cache #69961
Merged
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.
PR Category
Performance Optimization
PR Types
Performance
Description
Pcard-70459
优化 FA 编译,当 bos 上有 cache 时,不进行实际的编译,而是从 bos 上直接拉编译好的 so
打包 cache 方法:
1、进入到
third_party/flashattn
目录中获取gitcommit
2、创建
flashattn_libs_*gitcommit*
文件夹3、创建
fa_libs
文件夹,然后将编译完成的 sobuild/third_party/install/flashattn/lib/lib*.so
拷贝进去。4、执行打包操作
tar -cf fa_libs.tar fa_libs
5、执行
md5sum fa_libs.tar
获取 MD5SUM 值,写入到MD5.txt
文件中6、执行
tar flashattn_libs_*gitcommit* flashattn_libs_*gitcommit*.tar
命令整体打包7、上传到 bos
文件名命名规则:
flashattn_libs_*gitcommit*.tar
,例如 flashattn_libs_6ea759b3ea9563b49d92f1ae0c4cb0fb26a7b365.tar文件目录结构: