A command-line interface tool for submitting solutions to the gpumode.com

Tested on linux and mac but should just work on Windows as well.
Profile your kernels with --mode profile and get detailed metrics. Currently only available for the NVFP4 Blackwell competition (Modal, which we use for other competitions, does not support NCU). See docs/profiling.md for details.
Linux/macOS/Unix:
curl -fsSL https://raw.githubusercontent.com/gpu-mode/popcorn-cli/main/install.sh | bashWindows (PowerShell):
powershell -ExecutionPolicy Bypass -Command "iwr -UseBasicParsing https://raw.githubusercontent.com/gpu-mode/popcorn-cli/main/install.ps1 | iex"After installation, restart your terminal (or run source ~/.bashrc / source ~/.zshrc).
- Download the binary for your OS from releases
- Extract the archive
- Move the binary to a directory in your PATH
- Make it executable (Linux/macOS):
chmod +x popcorn-cli
- Download rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh cd popcorn-cli && ./build.sh
Command not found after installation:
- Restart your terminal
- Check if the install directory is in your PATH:
- Linux/macOS:
echo $PATH - Windows:
echo $env:PATH
- Linux/macOS:
- Check if POPCORN_API_URL is set to https://discord-cluster-manager-1f6c4782e60a.herokuapp.com
- Linux/macOS:
echo $POPCORN_API_URL - Windows:
echo $env:POPCORN_API_URL
- Linux/macOS:
Since we're effectively giving out GPUs for free we rely on either github or discord authentication to prove that you're a real human before you access our service.
- Go to the GPU Mode Discord server and type in
/get-api-url - Copy paste that url out
export POPCORN_API_URL="result_of_get_api_url" - We recommend you authenticate via your Discord as this will guarantee that your name will show up correctly on the leaderboard, you can do this via
popcorn-cli register discord. However in case this doesn't work for you we also support Github based authentication withpopcorn-cli register github - To ensure the above worked you can run
cat $HOME/.popcorn.yamlwhich should print your client ID which is what will be sent to us on every request
Sometimes you'll get an error that you're already authenticated despite being unable to submit in which case you can run popcorn-cli reregister [discord|github].
wget https://raw.githubusercontent.com/gpu-mode/reference-kernels/refs/heads/main/problems/pmpp/grayscale_py/submission.py
popcorn-cli submit --gpu A100 --leaderboard grayscale --mode leaderboard submission.pyWe regularly run competitions with clear due dates but for beginners we will always keep open the PMPP_v2 problem set https://github.com/gpu-mode/reference-kernels/tree/main/problems/pmpp_v2
Submit a solution to a leaderboard. Supports both TUI (interactive) and plain modes.
# Interactive TUI mode - select leaderboard, GPU, and mode interactively
popcorn submit solution.py
# Direct submission with all options
popcorn submit --leaderboard grayscale --gpu A100 --mode leaderboard solution.py
# Plain output mode (no TUI, good for CI/scripts)
popcorn submit --no-tui --leaderboard grayscale --gpu A100 --mode test solution.py
# Save results to a file
popcorn submit --output results.json --leaderboard grayscale --gpu A100 --mode benchmark solution.pySubmission modes:
test- Quick test run to check correctnessbenchmark- Benchmark your solution (no leaderboard impact)leaderboard- Official ranked submissionprofile- Profile with Nsight Compute (limited availability)
Manage your past submissions.
# List your submissions for a leaderboard
popcorn submissions list --leaderboard grayscale
# Limit number of results
popcorn submissions list --leaderboard grayscale --limit 10
# View a specific submission with full code
popcorn submissions show <ID>
# Delete a submission (with confirmation prompt)
popcorn submissions delete <ID>
# Delete without confirmation
popcorn submissions delete <ID> --forceRegister or re-register your CLI with Discord or GitHub.
# Initial registration (Discord recommended)
popcorn register discord
popcorn register github
# Re-register if you need to link a new account
popcorn reregister discord
popcorn reregister githubAdmin commands require the POPCORN_ADMIN_TOKEN environment variable.
# Server control
popcorn admin start # Start accepting jobs
popcorn admin stop # Stop accepting jobs
popcorn admin stats # Get server statistics
popcorn admin stats --last-day # Stats for last 24 hours only
# Submission management
popcorn admin get-submission <ID> # Get any submission by ID
popcorn admin delete-submission <ID> # Delete any submission
# Leaderboard management
popcorn admin create-leaderboard <dir> # Create leaderboard from problem directory
popcorn admin delete-leaderboard <name> # Delete a leaderboard
popcorn admin delete-leaderboard <name> --force # Force delete with submissions
# Update problems from GitHub
popcorn admin update-problems
popcorn admin update-problems --problem-set nvidia --forceYou can embed default settings directly in your solution files:
#!POPCORN leaderboard grayscale
#!POPCORN gpu A100
def solution():
...Or C++ style:
//!POPCORN leaderboard nvidia-matmul
//!POPCORN gpu H100When these directives are present, you can submit with just:
popcorn submit solution.pySubmissions are always a single Python file. If you want to submit native CUDA code, you can use PyTorch's load_inline feature (which uses nvcc) or the more experimental compile_kernel API for fast compilation. See this example for reference.
For syntax highlighting of both C++ and Python in your IDE, you can use the PyTorch Load Inline Highlighter VS Code extension.
All reference kernels are available at gpu-mode/reference-kernels. Each problem directory contains:
reference.py- The reference implementation to beatsubmission.py- A sample submission you can use as a starting pointtask.yml- Input shapes and problem configuration
Our entire evaluation infrastructure is open source and you can learn more here. Development happens on the KernelBot discord
Interested in new kernel competitions? Join discord.gg/gpumode and check out the #announcements channel to be notified when new challenges drop.
glhf!