Sparse Matrix-Dense Matrix Multiplication
2026/3/9小于 1 分钟
Sparse Matrix-Dense Matrix Multiplication
题面
实现稀疏矩阵 A(M×N) 与稠密矩阵 B(N×K) 的乘法,得到稠密 C(M×K)(行优先,float32)。A 约 60–70% 稀疏。
Implementation Requirements
- Use only GPU native features (external libraries are not permitted)
- The solve function signature must remain unchanged
- 结果写入矩阵 C
Examples
见页面示例(A:3×4, B:4×2 → C:3×2)。
Constraints
- 1 ≤ M,N,K ≤ 8,192;值域 [−10,10]
- A 稀疏度约 60–70%
- Performance: M=4,096, N=2,048, K=512