← 开源

PyTorch bindings for CUTLASS grouped GEMM.

InfrastructureKernelsCuda
增长势头
+024 小时新增 Star0.0%
158
Star
89
Fork
+1
本周
6
贡献者
创建于 2023-09-19 · 更新于 2026-11-30 · 今日第 28053 名
主要开发者
README

Grouped GEMM

A lighweight library exposing grouped GEMM kernels in PyTorch.

Installation

Run pip install grouped_gemm to install the package.

Compiling from source

By default, the installed package runs in conservative (cuBLAS) mode: it launches one GEMM kernel per batch element instead of using a single grouped GEMM kernel for the whole batch.

To enable using grouped GEMM kernels, you need to switch to the CUTLASS mode by setting the GROUPED_GEMM_CUTLASS environment variable to 1 when building the library. For example, to build the library in CUTLASS mode for Ampere (SM 8.0), clone the repository and run the following:

$ TORCH_CUDA_ARCH_LIST=8.0 GROUPED_GEMM_CUTLASS=1 pip install .

See this comment for some performance measurements on A100 and H100.

Benchmark example

python benchmark.py

Upcoming features

  • Hopper-optimized grouped GEMM kernels.
排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载