awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
xlite-dev avatar

xlite-dev/LeetCUDA

0
View on GitHub↗
9,694 stars·962 forks·Cuda·gpl-3.0·11 viewsgithub.com/xlite-dev/LeetCUDA↗

LeetCUDA

LeetCUDA is a collection of high-performance GPU kernel libraries focusing on memory optimization, activation functions, and attention mechanisms. It serves as a reference library for CUDA kernel implementations, ranging from basic element-wise operations to complex neural network components, and provides Python bindings to integrate these kernels into deep learning workflows.

The project is distinguished by its focus on low-level hardware optimizations. This includes the use of tensor cores for half-precision matrix multiplication, asynchronous data pipelining with double buffering, and shared memory swizzling to prevent bank conflicts. It also features advanced attention implementations, such as FlashAttention and FlashAttention-2, utilizing fine-grained tiling and low-level assembly.

The library covers a broad surface of GPU primitives, including a variety of activation functions, normalization layers, and matrix operations. It also implements parallel patterns such as warp-level reductions, dot products, and matrix transpositions. For computer vision tasks, it includes a GPU-accelerated implementation of non-maximum suppression.

The repository includes tools for verifying hardware performance through assembly inspection, kernel profiling, and throughput benchmarking against standard libraries.

Features

  • GPU Kernel Implementations - Provides a comprehensive collection of custom-written CUDA kernels for accelerated parallel computing and neural network operations.
  • Activation Functions - Ships a suite of optimized CUDA kernels for element-wise activation functions like ReLU, GELU, and Sigmoid.
  • Attention Kernel Libraries - Provides optimized CUDA kernels for scaled dot-product attention using tensor cores and fine-grained tiling.
  • FlashAttention - Implements FlashAttention using low-level assembly and fine-grained tiling for extreme memory optimization.
  • FlashAttention-2 - Implements FlashAttention-2 utilizing tensor cores and hardware instructions for high-dimensional tensor operations.
  • Half-Precision Matrix Multiplications - Provides half-precision matrix multiplication utilizing shared memory swizzling and asynchronous copy instructions for maximum throughput.
  • Normalization Layers - Implements layer normalization to standardize vectors and stabilize training in neural networks.
  • Python Bindings - Provides Python bindings that wrap custom CUDA kernels for use within PyTorch deep learning workflows.
  • Tensor Core Optimization - Leverages tensor cores for hardware-accelerated half-precision matrix multiplications and tensor operations.
  • Matrix Multiplication Utilities - Implements single-precision matrix multiplication optimized with shared memory tiling and double buffering.
  • Vectorized Memory Access - Increases throughput by loading multiple data elements simultaneously using vectorized types.
  • Asynchronous Data Pipelining - Implements asynchronous data pipelining to overlap global memory loads with computation using double buffering.
  • GPU Memory Optimizations - Implements shared memory swizzling, double buffering, and vectorized access to maximize GPU memory throughput.
  • C-Bindings - Ships Python wrappers providing direct access to low-level C++ CUDA kernels for performance-critical operations.
  • Shared Memory Swizzling - Prevents shared memory bank conflicts by rearranging data access patterns via swizzling.
  • Warp-Level Primitives - Implements high-performance warp-level reduction and shuffle instructions for parallel data aggregation on GPUs.
  • GPU Matrix Operation Implementations - Provides high-performance GPU implementations of matrix operations utilizing specialized libraries like CUTLASS and CuTe.
  • Matrix-Vector Products - Implements single-precision matrix-vector products using tiling strategies and kernel optimizations.
  • Vectorized Memory Primitives - Utilizes vectorized memory primitives to load multiple data elements simultaneously and increase global memory throughput.
  • Tiled Memory Access Patterns - Implements fine-grained tiling to manage memory usage and maintain constant complexity at the hardware level.
  • Attention State Merging - Implements attention state merging for split-KV scenarios to reduce inference latency.
  • Activation Functions - Implements the Gaussian Error Linear Unit (GELU) activation using precision types and vectorization.
  • Python Bindings - Wraps custom CUDA kernels into Python bindings for seamless integration with PyTorch deep learning workflows.
  • Embedding Lookup Kernels - Implements specialized GPU kernels for embedding lookups using precision levels and vectorization.
  • Triton Kernels - Implements fused operations and attention states using the Triton domain-specific language.
  • Normalization Gradient Computations - Computes vector-jacobian products for weights and biases in layer normalization using parallel reduction.
  • Half-Precision Matrix-Vector Operations - Executes half-precision matrix-vector multiplication using tiling strategies and hardware acceleration.
  • Online Softmax Kernels - Implements softmax calculations using online techniques for GPU acceleration.
  • Rotary Positional Embeddings - Computes rotary positional embeddings to support relative token positioning in language model sequences.
  • RMS Normalizations - Provides root mean square layer normalization across various floating-point precisions and vectorization strategies.
  • Tensor Reductions - Performs sum reductions across warps and blocks using floating-point and integer precisions.
  • Warp-Level Reductions - Implements warp-level reductions using shuffle instructions to aggregate values across threads.
  • Element-wise Array Operations - Performs element-wise addition across float32 and float16 arrays using vectorized memory access.
  • Matrix Transposition Kernels - Rearranges matrix elements between rows and columns using vectorization and shared memory.
  • Online Softmax - Implements an online softmax approach to compute probabilities across tokens while reducing memory overhead.
  • Block-Level Reductions - Calculates total sums across a block using warp-level primitives and shared memory.
  • Vector Dot Product Kernels - Computes the scalar product of two vectors using floating-point precisions and vectorization.

Star history

Star history chart for xlite-dev/leetcudaStar history chart for xlite-dev/leetcuda

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to LeetCUDA

Similar open-source projects, ranked by how many features they share with LeetCUDA.
  • tile-ai/tilelangtile-ai avatar

    tile-ai/tilelang

    5,226View on GitHub↗

    TileLang is a Python-embedded domain-specific language compiler that JIT-compiles and autotunes GPU kernels. It uses a tile-based DSL, automatic software pipelining, and parallel autotuning to generate optimized GPU kernels at runtime. It supports tensor core operations with Pythonic syntax, automatic memory management, and thread mapping. The compiler searches over tile sizes, thread counts, and scheduling policies, compiling and benchmarking candidates in parallel to find the fastest kernel. It also caches compiled binaries and tuning results to disk for reuse across sessions. TileLang inc

    Python
    View on GitHub↗5,226
  • d2l-ai/d2l-end2l-ai avatar

    d2l-ai/d2l-en

    29,001View on GitHub↗

    This project is an educational platform and research toolkit designed to teach deep learning through a combination of mathematical theory, visual diagrams, and executable code. It provides a comprehensive environment for building, training, and evaluating neural networks, grounding complex concepts in interactive computational notebooks that allow for hands-on experimentation. The framework distinguishes itself by interleaving theoretical foundations—including linear algebra, calculus, and probability—with practical implementations across multiple industry-standard libraries. It supports flex

    Pythonbookcomputer-visiondata-science
    View on GitHub↗29,001
  • nvidia/cutlassNVIDIA avatar

    NVIDIA/cutlass

    9,904View on GitHub↗

    Cutlass is a collection of C++ templates and Python interfaces for implementing high-performance linear algebra operations on NVIDIA GPUs. It provides a kernel composition framework for designing custom GPU kernels and a mixed-precision tensor library capable of executing operations across diverse data formats, ranging from 64-bit floating point to 4-bit integers. The project features a toolkit for operator fusion that integrates activation functions and bias calculations directly into matrix multiplication kernels to reduce memory passes. It also includes a Python-based domain-specific langu

    C++cppcudadeep-learning
    View on GitHub↗9,904
  • flashinfer-ai/flashinferflashinfer-ai avatar

    flashinfer-ai/flashinfer

    4,996View on GitHub↗

    FlashInfer is a library of high-performance GPU kernels purpose-built for accelerating large language model inference. It provides optimized implementations for attention operations (including flash attention, page attention, multi-head latent attention, and cascade attention) using paged key-value caches, fused kernel composition, and just-in-time compilation. The library also includes specialized kernels for mixture-of-experts layers, block-scaled low-precision quantization (FP8, FP4), and distributed collective communication. What distinguishes FlashInfer is its fused all-reduce communicat

    Pythonattentioncudadistributed-inference
    View on GitHub↗4,996
See all 30 alternatives to LeetCUDA→

Frequently asked questions

What does xlite-dev/leetcuda do?

LeetCUDA is a collection of high-performance GPU kernel libraries focusing on memory optimization, activation functions, and attention mechanisms. It serves as a reference library for CUDA kernel implementations, ranging from basic element-wise operations to complex neural network components, and provides Python bindings to integrate these kernels into deep learning workflows.

What are the main features of xlite-dev/leetcuda?

The main features of xlite-dev/leetcuda are: GPU Kernel Implementations, Activation Functions, Attention Kernel Libraries, FlashAttention, FlashAttention-2, Half-Precision Matrix Multiplications, Normalization Layers, Python Bindings.

What are some open-source alternatives to xlite-dev/leetcuda?

Open-source alternatives to xlite-dev/leetcuda include: tile-ai/tilelang — TileLang is a Python-embedded domain-specific language compiler that JIT-compiles and autotunes GPU kernels. It uses a… d2l-ai/d2l-en — This project is an educational platform and research toolkit designed to teach deep learning through a combination of… nvidia/cutlass — Cutlass is a collection of C++ templates and Python interfaces for implementing high-performance linear algebra… flashinfer-ai/flashinfer — FlashInfer is a library of high-performance GPU kernels purpose-built for accelerating large language model inference.… facebookresearch/flashlight — Flashlight is a C++ machine learning library and deep learning framework designed for building and training neural… deepseek-ai/flashmla — FlashMLA is an LLM attention kernel library and inference acceleration library providing a collection of…