Skip to content

Add challenge 75: Sparse Matrix-Dense Matrix Multiplication (SpMM) (Medium)#198

Merged
kunal-mansukhani merged 1 commit intomainfrom
add-challenge-75-spmm
Feb 28, 2026
Merged

Add challenge 75: Sparse Matrix-Dense Matrix Multiplication (SpMM) (Medium)#198
kunal-mansukhani merged 1 commit intomainfrom
add-challenge-75-spmm

Conversation

@claude
Copy link
Contributor

@claude claude bot commented Feb 28, 2026

Summary

  • Adds challenge 75: Sparse Matrix-Dense Matrix Multiplication (SpMM) at medium difficulty
  • Given a sparse matrix A (M×N, ~65% zeros) and a dense matrix B (N×K), compute dense output C = A × B (M×K)
  • Extends challenge 18 (SpMV) to the matrix-matrix case, requiring solvers to think about 2D work distribution, shared memory tiling for B, and load-imbalance across sparse rows
  • Validated: all functional and performance tests pass on NVIDIA Tesla T4

Test plan

  • generate_example_test matches HTML example (3×4 × 4×2 → 3×2 output)
  • generate_functional_test has 9 cases covering edge cases (1×1, K=1), zero matrix, identity, powers-of-2, non-powers-of-2, negatives, and realistic sizes
  • generate_performance_test uses M=4,096, N=2,048, K=512 (~35% density), fits 5× in 16 GB
  • All 6 starter files present and lint-clean
  • pre-commit run --all-files passes
  • CUDA solution validated via run_challenge.py --action submit — all tests passed

🤖 Generated with Claude Code

…edium)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kunal-mansukhani kunal-mansukhani merged commit b59a50f into main Feb 28, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant