GPU Challenges — Test Your CUDA & Python GPU Skills

GPU Challenges

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

Challenge Details

Image Blur Filter

medium

Implement a 3x3 box blur on a grayscale image while handling borders carefully so edge pixels only average valid neighbors.

Your Goal
  • Translate 2D thread coordinates into image x and y positions.
  • Loop over the 3x3 neighborhood while ignoring out-of-bounds pixels.
  • Average the valid samples and write the blurred output pixel.
Focus Areas
  • 2D memory indexing
  • Boundary-safe stencil logic
  • Neighborhood accumulation and normalization
What Success Looks Like
  • Center pixels should reflect a full 3x3 average.
  • Corner and edge pixels should not read outside the image.
  • Output values should remain in a valid unsigned char range.
image-blur.cuPractice Mode
Terminal Output
Select a challenge and write your solution, then run it.
Need more credits? Upgrade your plan →