Test Triton solutions locally against any challenge using scripts/test_local.py:
# Setup (one-time)
conda create -n leetgpu python=3.11 -y
conda activate leetgpu
pip install torch triton
# Run all tests (functional + performance)
python scripts/test_local.py challenges/easy/1_vector_add solution.triton.py
# Functional tests only
python scripts/test_local.py challenges/easy/1_vector_add solution.triton.py --functional-only
# Performance benchmark only
python scripts/test_local.py challenges/easy/1_vector_add solution.triton.py --perf-only --iterations 500The harness compares your solution against the challenge's reference_impl for correctness, and benchmarks performance against the PyTorch baseline.
This is the challenge set for LeetGPU.com. We welcome contributions and bug reports!
Each challenge includes problem descriptions, reference implementation, test cases, and starter templates for multiple GPU programming frameworks.
Each challenge contains:
challenge.html: Detailed problem description, examples, and constraintschallenge.py: Reference implementation, test cases, and challenge metadatastarter/: Template files for each supported framework
See CONTRIBUTING.md for guidelines on contributing new challenges or improvements.
This problem set is licensed under CC BY‑NC‑ND 4.0 license.
© 2025 AlphaGPU, LLC. Commercial use, redistribution, or derivative use is prohibited.