# DeepGEMM-Ascend: Fast GEMM Kernels for Huawei Ascend NPUs

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/deepseek-ai-deepgemm-ascend
Generated for open source discovery and AI-assisted research.

DeepGEMM-Ascend ports DeepSeek's DeepGEMM library to Huawei Ascend NPUs, with API-compatible kernels for BF16, FP8 and FP4 GEMM, MQA logits, and MegaMoE. It targets teams optimizing inference and training workloads on Ascend 950 hardware.

GitHub: https://github.com/deepseek-ai/DeepGEMM-Ascend
OSRepos URL: https://osrepos.com/repo/deepseek-ai-deepgemm-ascend

## Summary

DeepGEMM-Ascend ports DeepSeek's DeepGEMM library to Huawei Ascend NPUs, with API-compatible kernels for BF16, FP8 and FP4 GEMM, MQA logits, and MegaMoE. It targets teams optimizing inference and training workloads on Ascend 950 hardware.

## Topics

- c++
- library
- performance
- ascend-npu
- gemm-kernels
- mixture-of-experts

## Repository Information

Last analyzed by OSRepos: Sat Nov 14 2026 00:02:25 GMT+0000 (Western European Standard Time)
Detail views: 2
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Overview

DeepGEMM-Ascend is DeepSeek's port of its DeepGEMM matrix multiplication kernel library to Huawei Ascend NPUs. It provides a compatible API for Ascend users and addresses the complexity of implementing efficient kernels around Ascend's matrix multiply-add primitives, layouts, alignment constraints, and low-level parameters.

The library targets performance-critical model workloads, combining a lightweight abstraction with Ascend-specific techniques such as sparse data loading and coroutine-based pipelining. Its documented support centers on Ascend 950 devices and includes dense GEMM, MQA logits, and MoE operations.

## Key Features

- API-compatible port of DeepSeek's DeepGEMM, intended to preserve a familiar development workflow.
- BF16, FP8, FP4, and mixed FP8×FP4 GEMM kernels.
- MQA logits kernels and scheduling metadata utilities.
- Grouped GEMM and MegaMoE operations for expert-based models.
- Ascend-focused kernel techniques, including sparse data loading and coroutine-based pipelining.
- Utilities for NPU architecture selection, core count, deterministic algorithms, and scaling-factor layout conversion.
- JIT kernel compilation with configurable caching and debugging options.

## Use Cases

- Ascend platform engineers needing low-level GEMM kernels for model inference or training.
- DeepSeek model teams running MoE workloads that need grouped GEMM or fused MegaMoE operations.
- Teams implementing MQA scoring for the DeepSeek Lightning Indexer on Ascend.
- Kernel developers seeking reference implementations of performance optimization techniques for Ascend hardware.

## Our Take

This is a focused, performance-oriented Ascend port with a compatible DeepGEMM interface, but its short project history and hardware-specific setup make it an early-stage choice for Ascend teams rather than a portable general-purpose library.

**Good fit if:**
- Your workloads run on Huawei Ascend 950 and need the listed GEMM, MQA, or MoE kernels.
- You already use DeepGEMM APIs or want Ascend-specific kernel implementations to study.
- Your team can build and validate C++ extensions in the documented CANN and Torch NPU environment.

**Look elsewhere if:**
- You need kernels for NVIDIA GPUs or another platform, rather than Huawei Ascend.
- You cannot provide the required Ascend hardware, CANN toolkit, and Torch NPU package.
- You need a project with a longer release history, since this repository is new and has no recorded release in the past year.

## Project Health

| Signal | Value |
|---|---|
| Status | **New**: less than six months old |
| Last commit | 2026-10-14 (30 days ago) |
| Commits, last 90 days | 3 |
| Releases, last 12 months | 0 |
| Contributors | 3 (top contributor: 33% of commits) |
| Issues closed, last 90 days | 2 |
| Pull requests merged, last 90 days | 1 |
| Project age | 45 days |

Checked on 2026-11-14 with the GitHub API.

## Project Facts

- Language: C++
- License: MIT
- Stars: 639
- Forks: 85
- Archived: no

## What You Need

Detected in the repository:

- Python (from setup.py)
- A test suite

## Getting Started

Clone the repository with its submodules, then install the package:

```bash
git clone --recursive https://github.com/deepseek-ai/DeepGEMM-Ascend.git
cd DeepGEMM-Ascend
pip install . --no-build-isolation
```

See the [README](https://github.com/deepseek-ai/DeepGEMM-Ascend#readme) for requirements, development setup, interfaces, and benchmark details.

## License in Plain Words

**MIT** (permissive).

- Commercial use: yes
- Modify and redistribute: yes
- You must keep: the copyright and license notice
- Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

## Considerations

- The documented development and validation target is Ascend 950, with CANN 9.20 and `torch_npu`; this is not a drop-in choice for other accelerator platforms.
- Building from source requires Python 3.10 or newer, C++20 `<format>` support, and the listed compiler tools. The HC prenorm kernel also depends on TileLang.
- The project is very new. Recent activity is limited, with only a few commits in the measured 90-day period and no releases in the past year. Three contributors are recorded, with work not concentrated in one person.
- The repository includes tests, but its measured project data shows no CI configuration. Teams should validate their own hardware and software combinations.
- The MIT license permits broad use, subject to its license terms and attribution requirements.