核心事实
DeepGEMM Ascend is a port of DeepGEMM to the HUAWEI Ascend platform. It is fully API-compatible with DeepGEMM and supports BF16, FP8, FP4 GEMM, MQA logits, and MegaMoE. On Ascend platforms, users can simply install the package and use the same APIs and development workflow as DeepGEMM on other supported platforms.
中文版:
DeepGEMM Ascend 是华为昇腾平台上的 DeepGEMM 实现。它完全兼容 DeepGEMM 的 API, 支持 BF16、FP8、FP4 GEMM、MQA logits 和 MegaMoE 算子。 DeepGEMM Ascend 和 DeepGEMM 使用相同的包名,用户只需安装当前包, 即可沿用其他平台上 DeepGEMM 的 API 和开发流程。
关键细节
News
2026.09.30: Initial release of DeepGEMM Ascend, with support for Ascend 950 devices. The kernels are designed to achieve near-peak hardware performance.
平台依赖
- HUAWEI Ascend NPU(在 Ascend 950 系列上开发和验证)
- CANN 9.20 toolkit(提供
bin/bisheng、bin/ld.lld) - Torch NPU 包
torch_npu - Python 3.10+
- C++20
<format>支持 tilelang(HC prenorm kernel 用)tree-sitter/tree-sitter-cpp
技术要点
- 对昇腾的矩阵乘加原语(MAD)提供轻量抽象,隐藏分形矩阵布局、对齐约束、地址计算、参数转换
- 采用昇腾平台特有优化:稀疏数据加载、基于协程的流水线
- ⚠️ 缩放因子格式与 NVIDIA 不同:每对 UE8M0 缩放因子沿 K 维打包进一个
int16, 以 MN-major 顺序存储 - 工具函数含
set_npu_arch/get_npu_arch(dav-*NPU 架构用于 JIT 编译)
仓库元信息
| 项 | 值 |
|---|---|
| 描述 | clean and efficient matrix multiplication kernel library for Huawei Ascend NPUs |
| 语言 | C++ |
| License | MIT |
| 创建 | 2026-09-29 |
| 最后推送 | 2026-09-30 |
| Stars | 456(2 天内) |