GPUKernelContest三个模板题优化 #6
Loading…
Reference in New Issue
No description provided.
Delete Branch "(deleted):main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #1: ReduceSum算子优化
标题
PR描述
3. 向量化内存访问
4. 最终实现选择
采用Thrust库的高度优化实现:
测试验证
正确性测试
误差控制: < 0.5% (符合要求)
性能测试
相关文件
reduce_sum_algorithm.maca- 算子实现utils/test_utils.h- 测试工具utils/performance_utils.h- 性能测试utils/yaml_reporter.h- 性能报告详细文档
完整优化过程和技术分析:
https://gitlink.org.cn/james918/GPUKernelContest/blob/main/S1/23/OPTIMIZATION.md#1-reducesum-算法优化
竞赛信息
赛题ID: 23
参赛仓库: https://gitlink.org.cn/james918/GPUKernelContest/tree/main/S1/23
提交邮箱: james.h.e@foxmail.com
补充说明
此优化作为GPU算子优化挑战赛(赛题23)的一部分,展示了:
期待审核和反馈!
[Optimization] 实现SortPair稳定排序,达到5.9 G/s吞吐量
3. 优化要点
stable_sort_by_key确保相同key的value顺序不变测试验证
正确性测试
稳定性验证:
性能测试
相关文件
sort_pair_algorithm.maca- 算子实现utils/test_utils.h- 测试工具sort_pair_performance.yaml- 性能报告详细文档
完整实现分析:
https://gitlink.org.cn/james918/GPUKernelContest/blob/main/S1/23/OPTIMIZATION.md#2-sortpair-算法优化
竞赛信息
赛题ID: 23
参赛仓库: https://gitlink.org.cn/james918/GPUKernelContest/tree/main/S1/23
提交邮箱: james.h.e@foxmail.com
Commit: 5940140
[Optimization] 实现TopkPair高效选择,性能与k值无关
3. 性能分析
为什么K值对性能几乎无影响?
时间分解:
结论: 对于K ≤ 1024,全排序策略最优
测试验证
正确性测试
测试覆盖:
性能测试
不同数据规模的K值无关性验证:
相关文件
topk_pair_algorithm.maca- 算子实现utils/test_utils.h- 测试工具topk_pair_performance.yaml- 性能报告详细文档
完整性能分析和算法选择:
https://gitlink.org.cn/james918/GPUKernelContest/blob/main/S1/23/OPTIMIZATION.md#3-topkpair-算法优化
竞赛信息
赛题ID: 23
参赛仓库: https://gitlink.org.cn/james918/GPUKernelContest/tree/main/S1/23
提交邮箱: james.h.e@foxmail.com
Commit: 5940140
补充说明
此优化展示了:
Pull request closed