LeetGPU - The CUDA Challenges
Written by Nikos Vaggalis   
Friday, 04 April 2025

LeetGPU is a platform where you can write and test CUDA code.
Now it adds Challenges to foster competition, asking you to put your GPU programming skills to the test by writing the fastest programs.

We've first encountered LeetGPU in the article Three NVIDIA CUDA Programming Super Resources and in particular

LeetGPU which is an online playground where you can write and run CUDA code. Makers AlphaGPU aim with it to "democratize access to hardware-accelerated languages" by emulating GPUs on CPUs using open-source simulators.

It's a great companion to your studying , since you can run CUDA code without having to set up anything. The platform is also working on challenges which will be coming very soon.

That time came. Challenges recently released, turn LeetGPU into a competitive arena where you can put your GPU programming skills to the test by writing the fastest programs.

The challenges vary and range from matrix multiplication and agent simulation to multi-head self-attention. For instance:

Vector Addition
Implement program that performs element-wise addition of two vectors containing 32-bit floating point numbers on a GPU. The program should take two input vectors of equal length and produce a single output vector containing their sum.

Color Inversion
Write a CUDA program to invert the colors of an image. The image is represented as a 1D array of RGBA (Red, Green, Blue, Alpha) values, where each component is an 8-bit unsigned integer (unsigned char).

2D Convolution
Implement a 2D convolution operation in CUDA. Given an input matrix and a kernel (filter), compute the convolved output. The convolution should be performed with a "valid" boundary condition, meaning the kernel is only applied where it fully overlaps with the input.

K-Means Clustering
Implement a CUDA program that performs k-means clustering on 2D data points. The program should partition data points into k clusters by iteratively assigning points to their nearest centroid and updating centroid positions until convergence.

The challenges are grouped by difficulty, easy, medium and hard. Next to the challenges' description you get a playground where you'll write and test your code; no complex local tool installing or GPUs necessary. They are offered/handled by LeetGPU.

To take the challenges and get into the leaderboard , login in is necessary, but you can easily do so using you Google or Github account SSO.

Additionally if you want to submit your solutions n times or get more involved, you can get a Pro account which buys you

  • Detailed GPU Timing Analysis
    Get cycle-accurate timing details for your CUDA kernel executions
  • Performance Percentiles
    Compare your solution performance against other users

In any case, the free offering is more than enough for most cases.

leetlogo

More Information

LeetGPU - The CUDA Challenges

Related Articles

Three NVIDIA CUDA Programming Super Resources

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Software Security Report Finds Third Party Code Most Problematic
12/03/2025

 

The latest edition of Veracode's annual State of Software Security report has identified that 80% of the applications tested over the last year have at least one security flaw, and just u [ ... ]



AlexNet Source Code Now Open Source
23/03/2025

Coming to attention by winning the ImageNet contest in 2012, the AlexNet neural network can be seen as being responsible for many of the subsequent breakthroughs in AI. Now the Computer History Museum [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 04 April 2025 )