Skip to content

About

一步步通关GPU编程

Topics

Resources

Contributing

Stars

92 stars

Watchers

1 watching

Forks

Latest commit

 

History

219 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

算力修仙笔记:LeetGPU 题解

网址:https://leetgpu.com/challenges 主页:https://leetgpu.com/EpicSamurai464

按题目记录 CUDA 解法、优化思路和部分完整实现。

CUDA Best Practices

索引

简单 · 20 题 · 中等 · 92 题 · 困难 · 35 题

简单题导览

数组与矩阵 卷积、激活与其他
Vector Addition 1D Convolution
Matrix Copy Color Inversion
Matrix Transpose ReLU
Matrix Multiplication Leaky ReLU
Reverse Array Gaussian Error Gated Linear Unit
Value Clipping Rainbow Table
Interleave Arrays GELU Activation
Matrix Addition RGB to Grayscale
Simple Inference Sigmoid Activation
Sigmoid Linear Unit
Swish-Gated Linear Unit

中等题导览

矩阵、线性代数与量化 注意力与序列模型
General Matrix Multiplication Softmax Attention
Batched Matrix Multiplication Grouped Query Attention
FP16 Batched Matrix Multiplication Attention With Linear Biases
Grouped GEMM Attention With Sinks
Sparse Matrix Vector Multiplication Decaying Causal Attention
Sparse Matrix Dense Matrix Multiplication Variable Length Causal Attention
LoRA Linear Rotary Positional Embedding
INT8 Quantized Matmul Token Embedding Layer
Weight Dequantization Linear Recurrence
Dot Product SSM Selective Scan
Hadamard Transform Speculative Decoding Verification
INT4 Weight-Only Quantized MatMul Adder Transformer Inference
Matrix Power INT8 KV-Cache Attention
Multi-LoRA Batched Linear Split-KV Attention Reduction
Subarray Sum SwiGLU MLP Block
2D FFT Beam Search Step
FP16 Dot Product Fused Logit Penalties
Fused QKV Projection with RoPE and KV Cache Update
Kimi Delta Attention
MoE Token Dispatch
MoE Top-K Gating
Paged KV-Cache Attention
Shared-Prefix Cascade Attention
Softmax Attention Backward
Vision Transformer Patch Embedding
归约、扫描与选择 空间算子与邻域计算
Reduction 2D Convolution
Count Array Element 3D Convolution
Count 2D Array Element Causal Depthwise Conv1D
Histogramming 2D Max Pooling
Prefix Sum Gaussian Blur
Parallel Reverse Scan GAE 2D Jacobi Stencil
Stream Compaction 2D Subarray Sum
Parallel Merge 3D Subarray Sum
Max Subarray Sum Nearest Neighbor
Top-K Selection Connected Components
Top-p Sampling N-body Gravitational Force
Integral Image
Count 3D Array Element
Hamming Top-K Search
Min-P Sampling
Monte Carlo Integration
Row-wise Argmax
Scatter Add
Segmented Exclusive Prefix Sum
归一化与概率 训练与优化
Batch Normalization Ordinary Least Squares
Layer Normalization Muon Optimizer
RMS Normalization Distillation KL Divergence
Fused Residual Add And RMS Norm PPO Clipped Surrogate Loss
Softmax Categorical Cross Entropy Loss
Fused LayerNorm Linear GELU DPO Sequence Loss
Group Normalization Fused AdamW
GRPO Surrogate Loss
Layer Norm Backward
Logistic Regression
Mean Squared Error
MoE Expert Weight Gradient
RMS Norm Backward

困难题导览

注意力与 Transformer 图、排序与模拟
Multi Head Attention Bfs Shortest Path
Multi Head Cross Attention All Pairs Shortest Paths
Causal Self Attention Radix Sort
Sliding Window Self Attention Sorting
Linear Self Attention K Means Clustering
GPT-2 Transformer Block Multi Agent Simulation
Fused RMSNorm and W8A8 Linear Fast Fourier Transform
Llama Transformer Block Non-Maximum Suppression
Fused RoPE Causal Attention
Differential Attention
Diffusion Transformer Block
Flash Decoding Attention
FP8 Block-Scaled GEMM
Fused Gate-Up Projection with SiLU
Fused Linear Cross Entropy
Fused Mamba-2 SSD Scan
Fused MoE SwiGLU Layer
Fused Residual Add and LayerNorm with Saved Statistics
Gated Attention
Multi-Head Latent Attention Decode
Multi-Scale Deformable Attention
NVFP4 Matrix Multiplication
Softcapped Sliding Window Attention
Speculative Tree Attention
Block-Sparse KV Selection Attention
Paged Chunked Prefill Attention
TurboQuant KV Cache Attention

About

一步步通关GPU编程

Topics

Resources

Contributing

Stars

92 stars

Watchers

1 watching

Forks

Contributors

Languages