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.
描述
在infinicub包中编译cub模板函数,得到ininicub.a静态库,安装在~/.infini/package/目录下。
在编译InfiniCore时,可以直接链接 ~/.infini/package/中的ininicub.a静态库。
因此,不必每次都编译cub模板函数,减少了编译时间。
ps:只会在第一次执行
xmake f --nv-gpu=true --cuda=$CUDA_HOME --prebuild=true -cv时,编译并安装。修改前:185.13s。

修改后: 30.49 s。

编译耗时约减少了83%。
修改内容:
修改1: 增加了infinicub的源码,在./src/infinicub/目录下。
修改2: 增加了描述infinicub信息的cub.lua文件,在./xmake/目录下。
修改3: 修改了./xmake/cuda.lua文件,在infiniop-cuda目标中,增加了infinicub包依赖。
修改4: 修改了./xmake.lua文件,增加了prebuild参数。
修改5: 修改了readme文件的注释。
由于修改了random_sample的cuda的代码,需要重新测试:

win和linux都测试通过!