赛题 #37: ReduceSum, SortPair, TopkPair 算法优化 #8

Open
xingjian wants to merge 5 commits from xingjian/GPUKernelContest:main into main

5 Commits

Author SHA1 Message Date
chenxingqiang 659b02bbe8 docs(S1/37): Remove unused section and clarify prompt usage
- Deleted the unused section on using Claude for assistance
- Streamlined the document for better clarity and focus on prompt templates
2025-12-03 15:26:28 +08:00
chenxingqiang ffcd1fadad docs(S1/37): Separate LLM prompt templates into standalone file
- Created LLM_PROMPT_TEMPLATES.md with 5 reusable prompt templates
- Updated OPTIMIZATION_REPORT.md to reference the templates file
- Keep optimization strategies in main report
2025-12-03 15:09:58 +08:00
chenxingqiang 6aecbb980e docs(S1/37): Update report with reusable LLM prompt templates
- Added 5 general-purpose prompt templates for GPU optimization
- Included prompt usage tips and best practices
- Removed verbose process descriptions
- Templates can be reused for other GPU optimization tasks
2025-12-03 15:07:56 +08:00
chenxingqiang a087148618 docs(S1/37): Add optimization report with LLM prompts
- Detailed performance analysis for all three algorithms
- Hardware-specific optimization strategies documented
- LLM (Claude) prompts recorded for bonus points
- Experience summary and lessons learned
2025-12-03 15:06:07 +08:00
chenxingqiang b1355c19d9 feat(S1/37): Optimize ReduceSum, SortPair, TopkPair algorithms
Performance improvements (vs Thrust baseline):
- ReduceSum: +73% (1M), +16% (128M), +3% (512M), +1% (1G)
- SortPair: +68% (1M), +9% (128M-1G)
- TopkPair: +75% (1M), +11% (128M-1G)

Optimization techniques:
- ReduceSum: Custom kernel with warp shuffle + vectorized float4 load + contiguous memory access
- SortPair: mccub DeviceRadixSort (MetaX CUB library)
- TopkPair: mccub DeviceRadixSort with optimized buffer management

All tests passed on MetaX C500 GPU (MACA 3.0.0.8)

Issue: #37
2025-12-03 14:59:41 +08:00