公开研究台账

← 回 inbox 条目列表

DeepGEMM Ascend — DeepSeek 把核心 kernel 库移植到华为昇腾

inbox · 2026-10-02 · 0008_deepgemm_ascend · 57 行 · 更新于 2026-10-02(4 周前)
工作稿全文:事实、推断与「查不到」并存,是研究过程,不是结论; 已撤回或修正的数字以错误账为准。研究记录,不构成投资建议。
元数据(9 项)
idmaterial_2026_10_02_0008
captured_at2026-10-02T14:35:00+08:00
kindrepo
source_tierofficial
channelgui
title"DeepGEMM Ascend — DeepSeek 把核心 kernel 库移植到华为昇腾"
statusextracted
fact_ids[]
urlhttps://github.com/deepseek-ai/DeepGEMM-Ascend

核心事实

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++
LicenseMIT
创建2026-09-29
最后推送2026-09-30
Stars456(2 天内)