GPU Challenges — Test Your CUDA & Python GPU Skills

GPU Challenges

Solve GPU programming challenges in CUDA C++ or Python (PyTorch).

Challenge Details

Dot Product

medium

Compute a parallel dot product by multiplying vector elements in the kernel and reducing the partial products efficiently inside each block.

Your Goal
  • Multiply a[i] * b[i] before loading into shared memory.
  • Reduce each block's partial products down to a single value.
  • Return block-level partial sums for final accumulation on the host.
Focus Areas
  • Element-wise parallel work
  • Reduction reuse from previous challenge
  • Numerical verification against CPU expectations
What Success Looks Like
  • The combined result should match the expected dot product printed by the host.
  • Threads beyond n should contribute zero, not garbage values.
  • The partial sum array should contain one valid result per launched block.
dot-product.cuPractice Mode
Terminal Output
Select a challenge and write your solution, then run it.
Need more credits? Upgrade your plan →