AIAny
AI Infra2025
Icon for item

DeepGEMM

High-performance CUDA tensor-core GEMM kernel library for LLM workloads: supports FP8/FP4/BF16, fused Mega MoE and MQA scoring, and runtime JIT-compiled kernels. Targets NVIDIA SM90/SM100 and PyTorch—for teams working on low-level GPU kernel optimization.

Introduction

DeepGEMM addresses a narrow but critical layer of LLM stacks: the low-level matrix-multiply primitives and fused expert kernels where most compute and communication costs concentrate. By providing a small set of well-engineered tensor-core kernels (FP8/FP4/BF16), fused Mega MoE, and MQA scoring kernels compiled at runtime, it lets practitioners prototype and deploy highly optimized GEMMs without a heavyweight template/algebra dependency.

What Sets It Apart
  • Unified, focused kernel set: instead of a sprawling template library, DeepGEMM exposes a limited number of core kernels that cover dense GEMMs, grouped/masked GEMMs for MoE, and indexer MQA scoring—so it's easier to understand and extend for research or production tuning.
  • Runtime JIT workflow with low CPU overhead: kernels are compiled at runtime via a lightweight JIT module (optionally NVRTC) to avoid heavy install-time builds while keeping fast iteration for shape-specific tuning.
  • Cross-architecture optimizations: supports NVIDIA SM90 and SM100 with architecture-specific data layouts (e.g., FP32 scaling on SM90, packed UE8M0 format on SM100) and claims performance on modern hardware comparable to or exceeding expert-tuned libraries.
  • Fused Mega MoE with overlapped communication: provides a mega-kernel that fuses dispatch, FP8xFP4 linear layers, SwiGLU, and combine steps while overlapping NVLink communication—reducing end-to-end MoE latency for multi-process setups.
Who it's for & tradeoffs

Great fit if you need to build or tune low-level GPU primitives for LLMs and MoE models (researchers, infrastructure engineers, and model optimization teams). It’s also useful for teams building custom indexer scoring (MQA) or experimenting with FP8/FP4 arithmetic and alignment strategies.

Look elsewhere if you need a high-level, drop-in transformer library, multi-vendor GPU support (non-NVIDIA), or a turnkey model-serving product. DeepGEMM assumes NVIDIA GPUs (SM90/SM100), PyTorch 2.1+, CUDA toolkits (12.3+/12.9+ recommendations), and some familiarity with scaling-factor layouts and TMA alignment constraints.

Where it sits compared to adjacent projects

DeepGEMM draws inspiration from CUTLASS/CuTe but intentionally avoids heavy template/algebra dependence to remain lightweight and readable. Compared with general-purpose libraries (cuBLAS, CUTLASS) it trades a broader API surface for a tighter, LLM-focused kernel set and fused MoE primitives—making it more approachable for engineers wanting to learn or customize tensor-core kernel optimizations.

Overall, DeepGEMM is a practical choice when you care about squeezing the last percent of GEMM performance for LLM workloads and need a small, maintainable CUDA codebase that supports modern low-precision formats and fused MoE execution patterns.

Information

  • Websitegithub.com
  • AuthorsChenggang Zhao, Zhean Xu, Liang Zhao, Jiashi Li, Chenhao Xu, Anyi Xu, Shengyu Liu, Kexing Zhou, Kuai Yu
  • Published date2025/02/13

Categories

More Items

GitHub
AI Infra2025

Measures generative AI inference performance with token-level metrics (TTFT, inter-token latency), latency, and throughput under realistic traffic patterns. Provides a multiprocess engine, real-time TUI dashboard, extensible plugins, and integrations for telemetry and result uploads, aimed at inference benchmarking and capacity planning.

GitHub
AI Train2019

Train and experiment with multi-billion to trillion-parameter transformer models on large GPU clusters using GPU-optimized building blocks and reference training scripts; offers advanced parallelism and mixed-precision support for research teams and ML engineers.

GitHub

Indexes full text of visited web pages and local files on a self‑hosted server so you can search your personal knowledge from a web UI, terminal, CLI, or an AI assistant. Runs without mandatory telemetry, offers a browser extension for automatic capture, and supports optional semantic search via a configurable embeddings endpoint.