资料与版本
教材正文里出现的每一处源码与资料引用,都指向这里列出的上游地址。本地快照只用于写作与核对, 不上线;下面给出的是可以公开访问的原文链接。
例外的只有教程编者自己撰写的三篇综合笔记——它们是本项目的原创内容,因此随教程一起发布, 见 编者笔记。
版本锁定
版本锁定(全项目唯一事实来源)
所有章节、所有代码、所有引用,必须基于下表版本。任何地方出现「最新版」这类 模糊说法都算缺陷。若上游发布新 tag,只更新本文件并整体重审,不允许单章漂移。
| 组件 | 版本 | commit | 日期 | 本地路径 |
|---|---|---|---|---|
| TileLang(主干) | v0.1.15 |
a35f8ddf45eba16c21211ec8822d56ce5363036f |
2026-09-30 | _vendor/tilelang-v0.1.15/ |
| TileLang-Ascend(昇腾适配器) | TileLang-ascend-v0.1.2.000-release(仓库内 VERSION 文件写 0.1.4,以 tag 为准) |
89a9364e47a341fffdd65ed94786b1d4f9b6a78c |
2026-09-08 | _vendor/tilelang-ascend-v0.1.2.000/ |
辅助(仅供对照,不是分析基线):
| 组件 | 版本 | commit | 用途 |
|---|---|---|---|
| TileLang(上一个 release) | v0.1.14 |
7e3bbf3703e769479757eb7ecec2f2626f3cd0a8 |
回答「某能力是不是 v0.1.15 新增的」,见 _vendor/tilelang-v0.1.14/ |
取自 tag 而不是 main:main 每天都在动,无法让多个章节、多个作者得出可复核的结论。
两个仓库都是 git clone --depth 1 --branch <tag>,工作树干净,git status 为空。
v0.1.15 里有什么(写章节前先确认过的事实)
tilelang/ascend/与src/ascend/已经存在:昇腾后端已进主干,不只是适配器仓库。tilelang/{language,transform,layout,engine,backend,jit,cache,autotuner,carver,cuda,rocm,metal,cpu,webgpu,tools,profiler}/全部存在;examples/有 54 个子目录 + 3 个顶层文件(conftest.py、pytest.ini、quickstart.py,合计 57 项);docs/有 37 个 Markdown。VERSION文件 =0.1.15。
引用规则
- 引用源码时写成
_vendor/tilelang-v0.1.15/<相对路径>,并给出行号区间(path:120-138)。 - 引用资料时写成 corpus 路径:
资料库索引。 - 引用上游链接时必须是本 corpus 里已存在或已核验可达的 URL;无法核验的写 「未核验」并说明原因。
- 涉及「这个功能在不在 release 里」的判断,一律以本表版本为准;如果要讨论
main上更新的东西,必须显式标注「仅 main / 未进 v0.1.15」,并且放到第 30 章(前沿)里。
第五部分(第 32–39 章)的版本锁定
第五部分分析的是 2026-09-30 DeepSeek 面向昇腾开源的整套基础设施。它的对象不是一个
release tag,而是 13 个仓库在 2026-10-01 的 main 快照,以及官方发布文章的正文转录。
逐个仓库的 commit 与日期记录在 资料库索引,
站点构建时会把 资料库索引 的引用解析成对应 commit 的 GitHub
blob/tree 链接,所以行号是稳定可复核的。
| 组件 | 快照 commit | 说明 |
|---|---|---|
| TileKernels | 66258df6175d |
用 TileLang 写的双后端算子库(第 33、34 章) |
| DeepGEMM-Ascend | 8491bbb4b8c0 |
昇腾 BLAS 与 MegaMoE(第 35 章) |
| DeepEP-Ascend | 3b25377d04b2 |
昇腾专家并行通信(第 38 章) |
| FlashMLA | 2e5429fc5653 |
含昇腾稀疏注意力与技术报告(第 36 章) |
| DeepSelect | bfa4507d935f |
TopK 算子与算法报告(第 37 章) |
| DeepJIT / Engram / DeepSeek-V3.2-Exp / DualPipe / EPLB / clangd-ascend | main 快照 |
配套组件与论文 |
| DeepGEMM / DeepEP | main 快照 |
NVIDIA 侧对照物 |
引用规则同上:写成 资料库索引。
与 v0.1.15 的关系:TileKernels 明确要求 TileLang >= 0.1.15,所以第五部分与全书其他
部分共用同一个 TileLang 基线;凡是第五部分用到 TileLang 语言层面的结论,一律回到
_vendor/tilelang-v0.1.15/ 核对,不要用 DeepSeek 仓库里的二手说法。
验证边界(第五部分特别重要):本机既没有昇腾 NPU,也没有 NVIDIA GPU,也没有 CANN。 第五部分所有代码都只能静态阅读;所有性能数字都来自各仓库 README / 技术报告并注明 测量条件(硬件型号、CANN 版本、形状、口径)。任何地方不得出现本机实测的说法。
环境记录
写作时使用的本机环境(供代码章节标注测试条件):
- macOS (Apple Silicon),Python 3.11(miniconda)
- 没有 NVIDIA GPU,没有 昇腾 NPU
这条限制决定了两件事:
- 任何需要真实加速器才能运行的代码,章节必须提供:可离线静态检查的版本(语法/API 一致性)、代码阅读说明、以及「在有卡机器上如何验证」的步骤。禁止宣称跑过没跑过的 结果。
- 性能数字一律引用 corpus 内的原始出处(论文/官方文档),并标注来源 id。
引用清单(121 条)
按主题分组。每条给出上游地址与可信度标注;「一手」表示论文或源码本身,「厂商」表示厂商文档, 「社区」表示第三方文章。
DeepSeek 昇腾全栈开源 18
- DeepSeek 开源昇腾基础组件(官方发布说明)DeepSeek· 2026· 一手· deepseek-article-20260930
2026-09-30 的官方发布文章,列出了本次开源的六个组件与各自仓库地址。 本部分的所有章节都以这篇文章给出的清单为范围基线。
- deepseek-ai/TileKernelsDeepSeek· 2026· 一手· github-deepseek-tilekernels
用 TileLang 写的生产算子库,同一份算法提供 CUDA 与 Ascend 两个后端。 是「一份算法、两个后端」写法的最佳教材,也是本教程第 33、34 章的主线。
- deepseek-ai/DeepGEMM-AscendDeepSeek· 2026· 一手· github-deepseek-deepgemm-ascend
DeepGEMM 的昇腾实现,支持 BF16/FP8/FP4 GEMM、MQA logits、MegaMoE 与 mHC prenorm。 主体是 Ascend C 与 MAD 原语抽象,mHC prenorm 由 TileLang 实现,适合讲两条路线的分工。
- deepseek-ai/DeepEP-AscendDeepSeek· 2026· 一手· github-deepseek-deepep-ascend
昇腾上的专家并行通信库:EP dispatch/combine、FP8 dispatch、延迟 epilogue, 以及 PP/Bucket/Engram 等通信原语。README 给出了 EP8–EP128 的实测带宽。
- deepseek-ai/DeepGEMM(NVIDIA 版)DeepSeek· 2026· 一手· github-deepseek-deepgemm
DeepGEMM-Ascend 的对照物。官方明确说 Ascend 版「完全兼容 DeepGEMM 的 API」, 所以两边对照着读才能看清哪些是平台无关的接口、哪些是平台相关的实现。
- deepseek-ai/DeepEP(NVIDIA 版)DeepSeek· 2026· 一手· github-deepseek-deepep
DeepEP-Ascend 公开 API 的对齐目标(V2.5 的 EPBuffer 接口)。
- deepseek-ai/FlashMLADeepSeek· 2026· 一手· github-deepseek-flashmla
DeepSeek 的注意力算子库。2026-09-30 增加了昇腾 950 的稀疏 prefill/decode 算子, 并附一篇昇腾实现的技术报告(docs/20260930-ascend-prefill-deep-dive-zh.md)。
- Ascend Sparse Attention Forward 算法与优化技术简析DeepSeek· 2026· 一手· doc-flashmla-ascend-prefill-deep-dive
昇腾稀疏注意力算子的设计说明:1C2V 的推导、rescale 放哪、ND2NZ 时机、 gather2、高速 ND2NZ、icache 与 L1 bank 配平。本教程第 36 章的主要依据。
- deepseek-ai/DeepSelectDeepSeek· 2026· 一手· github-deepseek-deepselect
DSA 与采样器用的 TopK 算子,CUDA 与昇腾双平台。算法(阈值筛选 + RadixSelect) 与实现技巧分开讲,是「算法先行」的范例。
- DeepSelect 算法与实现简析DeepSeek· 2026· 一手· doc-deepselect-deep-dive
含随机块序下的期望复杂度证明,以及 CUDA 侧用 PTX 与位运算压低常数的技巧。
- deepseek-ai/DeepJITDeepSeek· 2026· 一手· github-deepseek-deepjit
DeepGEMM-Ascend 与 DeepEP-Ascend 共用的运行时编译层。 和 TileLang 自己的 JIT 是同一层抽象的两个实现,值得对照。
- deepseek-ai/Engram:Conditional Memory via Scalable LookupDeepSeek· 2026· 一手· github-deepseek-engram
TileKernels 里 Engram 算子的来源论文与参考实现。仓库内含 Engram_paper.pdf。
- Conditional Memory via Scalable Lookup: A New Axis of Sparsity for LLMs(Engram 论文)DeepSeek-AI / Peking University· 2026· 一手· paper-deepseek-engram
TileKernels 里 Engram 算子族的来源论文。给出 MoE(条件计算)与 Engram(条件记忆) 之间的容量分配 scaling law,并说明为什么确定性寻址可以把大表卸载到 host memory。 本地文本抽取见 14-deepseek-ascend-stack/raw/paper-deepseek-engram.md。
- mHC: Manifold-Constrained Hyper-ConnectionsDeepSeek-AI· 2025· 一手· paper-deepseek-mhc
TileKernels 的 mhc/ 算子族与 DeepGEMM-Ascend 的 HC prenorm GEMM 的论文依据。 第 4.3 节(Kernel Fusion / Recomputing / Overlapping Communication in DualPipe) 正是这几个 kernel 与 DualPipe 的设计来源。本地文本抽取见 14-deepseek-ascend-stack/raw/paper-deepseek-mhc.md,PDF 为 paper-deepseek-mhc.pdf。
- deepseek-ai/DeepSeek-V3.2-ExpDeepSeek· 2025· 一手· github-deepseek-v3-2-exp
DeepSeek Sparse Attention(DSA)的首次公开实现。FlashMLA 的稀疏算子与 DeepSelect 的 TopK 都是为它服务的,先读这里再看算子更顺。
- deepseek-ai/DualPipeDeepSeek· 2026· 一手· github-deepseek-dualpipe
双向流水并行算法,用来讲「通信与计算重叠」在训练侧的组织方式。
- deepseek-ai/EPLBDeepSeek· 2025· 一手· github-deepseek-eplb
专家并行负载均衡器。DeepEP-Ascend 的 lb_prefetch_weights / lb_reduce_grads 接口就是为它预留的。
- deepseek-ai/clangd-ascendDeepSeek· 2026· 一手· github-deepseek-clangd-ascend
昇腾 C/C++ 与 Ascend C 的 clangd 配置。写 Ascend C 侧代码时的补全与 lint 基础。
NVIDIA 后端与工具链 15
- CUDA C++ Programming GuideNVIDIA· 2026· 厂商· nvidia-cuda-c-programming-guide
The grid/block/warp/thread model, the memory hierarchy, and the async primitives (cp.async, TMA, mbarrier). Everything TileLang's "expert level" interface exposes is defined here first.
- CUDA C++ Best Practices GuideNVIDIA· 2026· 厂商· nvidia-cuda-best-practices
Practical performance model: occupancy, coalescing, arithmetic intensity. The baseline against which kernel authors judge a tile configuration.
- Parallel Thread Execution ISANVIDIA· 2026· 厂商· nvidia-ptx-isa
The instruction set TileLang ultimately emits. Read the sections on `mma`/`wgmma`/`tcgen05.mma`, `cp.async.bulk.tensor` (TMA), and the memory consistency model when you want to know what a TileLang intrinsic expands to.
- Hopper Tuning GuideNVIDIA· 2026· 厂商· nvidia-hopper-tuning-guide
Vendor tuning advice for sm90: TMA, clusters, distributed shared memory. The direct target of TileLang's cluster/TMA programming guide.
- Blackwell Tuning GuideNVIDIA· 2026· 厂商· nvidia-blackwell-tuning-guide
sm100/sm120 specifics: tensor memory (TMEM), tcgen05 MMA, block scaling. TileLang already has tcgen05 examples and macro generators; this is the document that explains the constraints they encode.
- CUTLASS DocumentationNVIDIA· 2026· 厂商· nvidia-cutlass-docs
The C++ tile library TileLang competes with and partly mirrors (CuTe layouts, MMA atoms, epilogues). Reading it makes `T.gemm`'s layout/policy parameters much less magical.
- CuTe: C++ template abstractions for layout algebraNVIDIA· 2026· 厂商· nvidia-cutlass-media-docs-cute
Layout algebra (shape/stride/layout composition, tiling and partitioning of threads and values). TileLang's layout inference solves the same problem symbolically; this is the concrete formulation to compare against.
- NVIDIA Hopper Architecture In-DepthNVIDIA· 2022· 厂商· nvidia-blog-hopper-architecture-in-depth
The vendor overview of Hopper: TMA (descriptor-based bulk async copy), thread block clusters and distributed shared memory, and the fourth-gen tensor core. This is the hardware story behind the `T.copy` -> TMA lowering and the cluster/TMA programming guide.
- CUDA Blackwell Compatibility GuideNVIDIA· 2026· 厂商· nvidia-blackwell-compatibility-guide
What changed for programs on Blackwell (sm100/sm120): new tensor-core and tensor-memory (TMEM) semantics, tcgen05 instructions, and the compatibility rules. Pair with the Blackwell Tuning Guide; the earlier blog-style architecture overview we tried to cite 404s, so this official guide is used instead.
- Nsight Compute DocumentationNVIDIA· 2026· 厂商· nvidia-nsight-compute-docs
How to measure a kernel: SOL sections, memory workload analysis, warp stalls. Needed for any serious tuning claim about a TileLang kernel.
- Benchmarking and Dissecting the Nvidia Hopper GPU ArchitecturearXiv· 2024· 一手· arxiv-2402-13499
Measured latencies/bandwidths for Hopper rather than vendor claims. The numbers you want when sanity-checking a pipeline stage count.
- Dissecting the NVIDIA Volta GPU Architecture via MicrobenchmarkingarXiv· 2018· 一手· arxiv-1804-06826
The original methodology paper for the Hopper/Blackwell dissections; useful when you need to measure an unfamiliar machine yourself.
- Dissecting the NVidia Turing T4 GPU via MicrobenchmarkingarXiv· 2019· 一手· arxiv-1903-07486
The intermediate step of the same series; retained for completeness of the hardware-model reading path.
- NVIDIA/cuda-samplesGitHub· 2026· 厂商· nvidia-cuda-samples
Reference CUDA implementations (including Hopper TMA/WGMMA samples). When a TileLang codegen path looks odd, compare the generated CUDA against the vendor's own sample.
- NVIDIA/cutlassGitHub· 2026· 厂商· github-nvidia-cutlass
Source for the C++ tile abstractions TileLang's CuTe/PTX intrinsics mirror, including the tcgen05 and block-scaled MMA generators.
TileLang 主干仓库 2
- tile-ai/tilelangGitHub· 2026· 一手· github-tile-ai-tilelang
The main repository (also cloned in full at 02-tilelang-core-repo/raw/tilelang). The README, docs/ tree, examples/ and tilelang/ + src/ trees are the ground truth for every claim in this corpus.
- microsoft/BitBLASGitHub· 2026· 一手· github-microsoft-bitblas
The low-bit operator library from the same MSRA group. Several ideas and contributors carried over into TileLang; reading it clarifies where the project's low-precision focus came from.
TileLang 昇腾后端 4
- TileLang AscendNPU IR 从入门到专家算子开发知识点HiAscend· 2026· 厂商· huawei-techarticle-tilelang-npuir
Huawei's own TileLang+Ascend training material: TileLang and MLIR basics, Pythonic programming, and a hand-written FlashAttention operator. The most direct official bridge between the two halves of this corpus.
- tile-ai/tilelang-ascendGitHub· 2026· 一手· github-tile-ai-tilelang-ascend
The dedicated Ascend adapter: two backend routes (Ascend C & PTO, and AscendNPU IR), a programming guide, per-operator tutorials, and DeepSeek V4 kernels. This is the single most important source for the Huawei side.
- tile-ai/tilelang-mlir-ascendGitHub· 2026· 一手· github-tile-ai-tilelang-mlir-ascend
The MLIR-based Ascend path. Where the TVM/TIR route and the MLIR route diverge is exactly the kind of question a would-be backend contributor has to answer, so both sources are needed.
- tile-ai/TileFoundryGitHub· 2026· 一手· github-tile-ai-tilefoundry
Infrastructure for standing up new TileLang backends. Read together with 08-frontier-unmerged/raw/github-issue-2115 (multi-backend refactoring) to understand how a third chip vendor is expected to plug in.
前沿与未合入 14
- [RoadMap] Multi-Backend Refactoring/DecouplingGitHub issue· 2026· 一手· github-issue-2115
The roadmap that made the Ascend/Hygon/MUSA adapters possible: how TileLang intends to decouple new backends from the CUDA-centric core. Essential for anyone planning to contribute a backend.
- RFC: migrate tilelang from TileLang/tvm to apache/tvm + apache/tvm-ffiGitHub issue· 2026· 一手· github-issue-2196
An open RFC with large blast radius: leaving the forked TVM for upstream TVM plus tvm-ffi. Explains a lot of in-flight churn in the tree.
- [RFC] Add explicit CUDA cache policies for normal global-memory copiesGitHub issue· 2026· 一手· github-issue-3178
Representative of the fine-grained control RFCs: exposing cache hints on plain global copies. Shows the level at which TileLang contributors argue.
- [RFC] Redesign reducers as ownership-safe deferred reductionsGitHub issue· 2026· 一手· github-issue-2897
Semantics-level RFC on reductions and buffer ownership; the kind of problem you meet as soon as you try to add a new reduction op or a new backend.
- [RFC] Define memory-order behavior for legacy CUDA atomic-add fallbacksGitHub issue· 2026· 一手· github-issue-2708
Memory-order semantics of atomics across codegen paths — a good test case for whether you actually understand TileLang's lowering.
- [Roadmap] Release Plan of tilelang 0.2.0GitHub issue· 2025· 一手· github-issue-79
The 0.2.0 plan; useful for dating features and for seeing which pieces were considered core versus experimental at that point.
- [Roadmap] Roadmap for Metal, OpenCL, VHLS, WebGPU, and SPIR-V SupportGitHub issue· 2025· 一手· github-issue-56
The non-NVIDIA backend roadmap (Metal/WebGPU/SPIR-V). Read it for the pattern a new target follows, even though this corpus ignores those chips.
- [RoadMap] CuteDSL BackendGitHub issue· 2026· 一手· github-issue-1454
The CuTe DSL backend line. It matters because it defines the boundary between TileLang's own lowering and NVIDIA's newer Python tile DSL (cuTile/CuTe DSL), which is the most serious competitor on the NVIDIA side.
- [Public Release 9/30] Introduce Ascend 950 backendGitHub PR· 2026· 一手· github-pr-3308
The PR that brought the Ascend 950 backend into mainline TileLang. The diff and review discussion are the most direct description of the Ascend/codegen surface that exists.
- [Ascend] Add PTO backend for Ascend950GitHub PR· 2026· 一手· github-pr-3310
Adds the PTO codegen target for Ascend 950 — the second of the two Ascend backend routes, and the one that connects to PTO-ISA/pyPTO.
- [Ascend] Add T.PersistentKernel and AutoPersistent passGitHub PR· 2026· 一手· github-pr-3325
In-flight Ascend feature: persistent kernels plus the pass that derives them. An example of frontier work that has not landed, exactly what the user asked to keep an eye on.
- feat(ascend): Add AutoSimtVF pass and register it in Ascend pipelineGitHub PR· 2026· 一手· github-pr-3320
In-flight: automatic SIMT/vector-fragment lowering for Ascend. Shows how the "tile -> SIMD/SIMT region" boundary is still being negotiated.
- [Ascend] Add TileLang agents for operator generation and tuningGitHub PR· 2026· 一手· github-pr-3329
In-flight: LLM agents that write and tune Ascend TileLang operators. Signals where the project expects operator development to go next.
- [Question] It seems there are two Ascend 950 backends, which is suggested to useGitHub issue· 2026· 一手· github-issue-3317
The maintainer discussion of Ascend C&PTO versus AscendNPU IR. Tl;dr-level guidance for choosing a route, straight from the people who wrote both.
华为昇腾与 CANN 15
- Pangu Ultra MoE: How to Train Your Big MoE on Ascend NPUsarXiv (Huawei)· 2025· 厂商· arxiv-2505-04519
Huawei's own account of training a large MoE on Ascend, including the software-stack constraints. Vendor source, and the least bad description of how the Ascend stack behaves at scale.
- NPUEval: Optimizing NPU Kernels with LLMs and Open Source CompilersarXiv· 2025· 一手· arxiv-2507-14403
Benchmark/eval for NPU kernel generation on Ascend; a concrete yardstick for the "LLM writes Ascend kernels" workflows that TileLang@Ascend is part of.
- CANN 异构计算架构总览HiAscend· 2026· 厂商· huawei-hiascend-cann
Entry point to CANN: GE/Graph Engine, runtime, compiler (bisheng), operator libraries, HCCL. Establishes which layer a given Ascend problem belongs to.
- Ascend C 算子开发HiAscend· 2026· 厂商· huawei-hiascend-ascend-c
The C/C++ kernel language TileLang@Ascend's PTO route lowers to. Reading it first makes the comparison "what does TileLang remove from Ascend C" concrete.
- CANN 编译器(毕昇编译器)HiAscend· 2026· 厂商· huawei-hiascend-bisheng
Huawei's LLVM-based compiler for Host-Device heterogeneous code. The backend TileLang's generated source is handed to.
- 昇腾算子开发场景HiAscend· 2026· 厂商· huawei-hiascend-operator
Vendor overview of the operator development options available on Ascend (Ascend C, TBE, Triton, and now TileLang), useful for positioning TileLang inside Huawei's own story.
- CANN 开源项目列表HiAscend· 2026· 厂商· huawei-hiascend-open-map
Map of Huawei's open-sourced CANN components (Ascend C, CATLASS, PTO, graph engine, ...). Use it as the authoritative list of where the source lives.
- cann/pto-isa — PTO instruction set architectureGitCode (CANN)· 2026· 厂商· gitcode-cann-pto-isa
The PTO (Programmable Tensor Operations) ISA specification — the tile-level instruction set that TileLang@Ascend's PTO backend targets, and the subject of the 知乎 author's article series.
- cann/catlass — Ascend C template libraryGitCode (CANN)· 2026· 厂商· gitcode-cann-catlass
Huawei's CUTLASS analogue for Ascend C. The baseline TileLang@Ascend GEMM kernels are benchmarked against.
- huawei-csl/pto-dslGitHub· 2026· 厂商· github-huawei-csl-pto-dsl
A Pythonic interface and JIT compiler for PTO-ISA — i.e. Huawei's own tile-DSL experiment next to TileLang. Comparing the two designs is one of the more informative exercises in this corpus.
- PTO-ISA/pto-specGitHub· 2026· 厂商· github-pto-isa-pto-spec
Formal definition of the PTO ISA (normative language / ASL model). The precise semantics behind the Ascend tile instruction set.
- PTO-ISA/PTO-GymGitHub· 2026· 厂商· github-pto-isa-pto-gym
Tile-operation tutorials and examples for PTO-based programming; the hands-on half of the PTO spec.
- huawei-csl/pto-kernelsGitHub· 2026· 厂商· github-huawei-csl-pto-kernels
Hand-written PTO kernels. These are the performance ceiling that a TileLang kernel on Ascend has to be compared against.
- huawei-csl/megagdn-ptoGitHub· 2026· 厂商· github-huawei-csl-megagdn-pto
Megakernel for Gated DeltaNet written with PTO-ISA. A concrete "what the low-level tile ISA can express" example on Ascend.
- PTO-ISA/pyCircuitGitHub· 2026· 厂商· github-pto-isa-pyciruit
Python-first hardware construction toolkit with MLIR compilation. Included because the 知乎 author's article set treats it as the hardware-generation end of the same PTO story, and it shows where the tile abstraction is heading beyond kernel writing.
相邻编译器 13
- MLIR: A Compiler Infrastructure for the End of Moore's LawarXiv· 2020· 一手· arxiv-2002-11054
The multi-level IR philosophy. TileLang keeps its own TVM/TIR path but the Ascend backend has an MLIR-based sibling (tilelang-mlir-ascend), so this is the common language between the two approaches.
- The Deep Learning Compiler: A Comprehensive SurveyarXiv· 2020· 一手· arxiv-2002-03794
Best single orientation to the whole compiler landscape (graph IR, operator level, multi-level IR, backends). Use it as the first reading for anyone who has only used PyTorch and never seen a compiler pass pipeline.
- Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning AbstractionsarXiv· 2018· 一手· arxiv-1802-04730
The polyhedral-scheduling ancestor of today's tensor DSLs. Shows the alternative design point (automatic scheduling) that TileLang consciously trades away for predictability and controllability.
- Triton: An Intermediate Language and Compiler for Tiled Neural Network ComputationsMAPL 2019 (Harvard / IBM)· 2019· 一手· triton-mapl-2019
The original Triton paper (DOI 10.1145/3315508.3329973), mirrored locally as triton-mapl-2019.pdf with a page-by-page text extraction in triton-mapl-2019.md. This is the design point TileLang is measured against: Triton treats the program as blocks over a tensor with a compiler-chosen schedule; TileLang keeps explicit tiles, layouts and memory placement in the language. Read it for what "tiled intermediate language" originally meant, and note that the 2019 language is much smaller than today's Triton.
- triton-lang/tritonGitHub· 2026· 一手· github-triton-lang-triton
The Triton implementation, i.e. TileLang's most common comparison target. The original paper is "Triton: An Intermediate Language and Compiler for Tiled Neural Network Computations" (MAPL 2019, DOI 10.1145/3315508.3329973); it is not mirrored here because the open copies we probed 404 and the ACM PDF is bot-blocked, so cite the DOI and use this repo plus the docs for detail. The decisive contrast with TileLang is that Triton hides the tile and lets the compiler pick the schedule, while TileLang keeps explicit tiles, layouts and memory placement in the language.
- Triton documentationTriton· 2026· 一手· triton-docs
Current Triton language/API reference, for side-by-side reading with the TileLang language guide.
- CuTe DSL 文档(CUTLASS Python DSL)NVIDIA· 2026· 厂商· nvidia-cutedsl-docs
NVIDIA 官方的 Python tile DSL 文档。它是 TileLang 在 NVIDIA 侧最直接的对照物: 同样用 Python 写 tile 程序,但绑定 CUTLASS/CuTe 的抽象与 NVIDIA 自己的编译路径。 第 5 章对比与第 24 章 NVIDIA 后端都用它来界定「TileLang 自己的边界在哪里」。
- NVIDIA/cutile-pythonGitHub· 2026· 厂商· github-nvidia-cutile-python
cuTile 的开源实现(Python 包)。NVIDIA 新一代 tile 编程模型,面向 Blackwell 一代的硬件特性;与 TileLang 属于同一抽象层次的竞争路线。第 1、5、24 章引用它 说明「tile DSL」这一波的产业走向。
- Apache TVM documentationApache· 2026· 一手· tvm-docs
Upstream TVM/TIR documentation: IR structure, schedules, target/device abstraction. TileLang is a TVM dialect in practice, so this is its standard library documentation.
- MLIR documentationLLVM· 2026· 一手· mlir-docs
Dialect and pass infrastructure. Required reading for the AscendNPU IR route, which is MLIR-based rather than TVM-based.
- Halide documentation — a language for fast, portable data-parallel computationHalide· 2026· 一手· halide-docs
The ancestor of the "separate algorithm from schedule" idea that TVM adopted and TileLang re-specialised for AI tiles.
- torch.compile documentationPyTorch· 2026· 一手· pytorch-torch-compile-docs
The graph-capture/Inductor pipeline that a TileLang kernel has to fit into when it is used from PyTorch. Explains the boundary TileLang does *not* cover (graph-level fusion and autotuning).
- PyTorch Inductor: generated kernelsPyTorch· 2026· 一手· pytorch-inductor-kernels
How to see the kernels Inductor generates. The practical way to decide when torch.compile is enough and when a TileLang kernel has to be dropped in.
知乎(乱序摸鱼) 1
- DeepSeek 开源昇腾基础组件将会带来哪些影响?知乎(乱序摸鱼)· 2026· 社区· zhihu-dazhiruoyu-deepseek-ascend
The single 知乎 article the user pointed at, and the best Chinese-language account of TileLang's Ascend port. Covers the NV-vs-950 architectural mismatch table, the new Ascend-specific intrinsics (T.alloc_l1/l0a/l0b/l0c, T.SimtVF/T.SimdVF, T.dual_copy), layout inference and ND->NZ fractal normalization, and how Z3 is used to solve the multi-pipeline scheduling and buffer-multiplicity constraints that Ascend C leaves to the human. Full text and images live in 09-zhihu-da-zhi-ruo-yu/raw/answers/.
社区、课程与讲解 4
- GPU MODE lecturesGitHub· 2026· 社区· gpu-mode-lectures
Community lecture series on GPU programming that repeatedly covers TileLang alongside CUDA/Triton. Good source of talk recordings and slides links for the learning-path document.
- TileLang-Ascend 视频课程(5 讲)Bilibili (tilelang-ascend team)· 2026· 一手· bilibili-tilelang-ascend-lessons
Official course: environment setup, programming basics, the developer programming model, performance-tuning/debug tools, and deployment. Recorded in Chinese; the companion repo is tile-ai/tilelang-ascend. (Only the landing page is archived here; this corpus does not mirror video.)
- tile-ai/tilelang-puzzlesGitHub· 2026· 一手· github-tile-ai-tilelang-puzzles
Ten graded exercises that teach TileLang by making you write kernels. The best existing starting point for the "learn by doing" track of a course.
- tile-ai/tilelang-lspGitHub· 2026· 一手· github-tile-ai-tilelang-lsp
Language server for TileLang kernels. Minor for learning, but it documents the developer-experience side of the frontend.
端到端训练与推理 13
- Hugging Face Transformers 文档Hugging Face· 2026· 厂商· hf-transformers-docs
端到端章节的基础工具文档:模型加载、tokenizer、Trainer/训练参数、混合精度、 checkpoint 保存与恢复。第 17 章「用 HF 资产训练 7B」直接依赖它。 (原地址 https://huggingface.co/docs/transformers/index 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- Hugging Face Datasets 文档Hugging Face· 2026· 厂商· hf-datasets-docs
数据集加载、流式读取、tokenize 与打包(packing)的官方说明;训练章节数据管线的 权威出处。 (原地址 https://huggingface.co/docs/datasets/index 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- Hugging Face Accelerate 文档Hugging Face· 2026· 厂商· hf-accelerate-docs
单机多卡/多机训练的抽象层,解释 device placement、混合精度与梯度同步在 HF 生态里 怎么表达。写训练章节时需要它来说明「哪些部分不归 TileLang 管」。 (原地址 https://huggingface.co/docs/accelerate/index 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- Hugging Face PEFT 文档Hugging Face· 2026· 厂商· hf-peft-docs
参数高效微调的官方文档;用于说明「不做全量预训练时,TileLang 该优化哪几个算子」。 (原地址 https://huggingface.co/docs/peft/index 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- Qwen2.5-7B 模型卡Hugging Face / 阿里通义· 2024· 厂商· hf-qwen2-5-7b-card
7B 规模、权重与配置完全开放、许可证清晰的开源模型,作为端到端章节的训练/推理 对象。模型卡给出结构参数(层数、hidden、GQA 配置),是算子选择与显存估算的依据。 (原地址 https://huggingface.co/Qwen/Qwen2.5-7B 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- FineWeb-Edu 数据集卡Hugging Face· 2024· 厂商· hf-fineweb-edu-card
公开的预训练语料样例,支持流式读取,适合教学规模的训练实验;训练章节用它构造 数据管线。 (原地址 https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- TinyStories 数据集卡Hugging Face· 2023· 厂商· hf-tinystories-card
小规模、可在单卡上跑完的语料,用于「先把训练循环跑通再放大」的教学路径。 (原地址 https://huggingface.co/datasets/roneneldan/TinyStories 在本机不可达:huggingface.co 直连与走本地代理均 SSL EOF,改用中国镜像 hf-mirror.com 抓取;镜像内容与官网一致,引用时以原地址为准。)
- Qwen2.5-7B config.json(结构参数)Hugging Face / 阿里通义· 2024· 厂商· hf-qwen2-5-7b-config
模型卡散文里没有的结构参数(hidden 3584 / intermediate 18944 / 28 层 / 28 头 / 4 个 KV 头 / vocab 152064 / rope_theta 1e6 / bf16)。第 17、18 章的显存与 KV cache 账本直接依赖这几个数字,所以单独存档(含原始 JSON 与摘要 Markdown)。
- pytorch/torchtitanGitHub· 2026· 一手· github-pytorch-torchtitan
PyTorch 官方的 LLM 训练参考实现(并行策略、checkpoint、显存优化)。第 17 章用它 说明「哪些部分可以换成 TileLang kernel,哪些部分不要动」。
- Lightning-AI/litgptGitHub· 2026· 一手· github-litgpt
可读性最强的 LLM 训练/微调参考实现之一,适合作为教学骨架;与 HF 生态衔接良好。
- karpathy/nanoGPTGitHub· 2024· 社区· github-nanogpt
最小可读的训练循环实现。教学价值在于「整条链路没有魔法」;用它讲清楚训练循环的 结构与可替换点。
- vLLM 文档vLLM· 2026· 一手· vllm-docs
推理服务章节的权威参考:PagedAttention、continuous batching、KV cache 管理与 自定义算子接入方式。第 18 章依赖它。
- vllm-ascendGitHub· 2026· 一手· github-vllm-ascend
昇腾上的 vLLM 硬件插件。用于说明昇腾推理部署的实际形态,也是「TileLang 算子如何 进入服务框架」的对照物。
算子库与运行时 6
- DeepSeek-V3 Technical ReportarXiv (DeepSeek)· 2024· 一手· arxiv-2412-19437
Defines MLA and the MoE structure that TileLang's flagship examples (deepseek_mla, fusedmoe, deepgemm) implement.
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement LearningarXiv (DeepSeek)· 2025· 一手· arxiv-2501-12948
Context for why DeepSeek's kernels (and hence TileLang's DeepSeek examples) became an industry reference point; kept for the workload-level narrative.
- tile-ai/TileOPsGitHub· 2026· 一手· github-tile-ai-tileops
High-performance LLM operator library built on TileLang. The natural reference for "what production TileLang kernels look like", including integration with PyTorch/vLLM.
- tile-ai/TileRTGitHub· 2026· 一手· github-tile-ai-tilert
Tile-based runtime for ultra-low-latency LLM inference. Shows what the kernels are deployed into, and the launch/scheduling constraints that come back as compiler requirements.
- tile-ai/tilelang-benchmarkGitHub· 2026· 一手· github-tile-ai-tilelang-benchmark
The project's own benchmark harness. Needed if you intend to make performance claims or detect regressions in a contribution.
- tile-ai/TileSightGitHub· 2026· 一手· github-tile-ai-tilesight
Companion repo of the TileSight analytical model; used to reason about tile choices without brute-force autotuning.
论文 12
- TileLang: A Composable Tiled Programming Model for AI SystemsarXiv (MSRA / Shanghai AI Lab / PKU)· 2025· 一手· arxiv-2504-17577
The reference paper for everything else in this corpus. Introduces the tile abstraction, the three-level programming interface (beginner / developer / expert), layout inference, and the "composable" claim: high-level tile ops coexist with thread primitives in one kernel, lowered through TVM TIR.
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessarXiv (NeurIPS 2022)· 2022· 一手· arxiv-2205-14135
The canonical tile-based fusion argument: the roofline/IO analysis that gives TileLang's attention examples their reason to exist.
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningarXiv· 2023· 一手· arxiv-2307-08691
Where the block partitioning, warp partitioning and shared-memory layout choices in TileLang's flash attention examples come from.
- FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisionarXiv· 2024· 一手· arxiv-2407-08608
The Hopper-specific design (ping-pong warp specialization, async TMA/MMA) that TileLang's Hopper examples and its warp-specialization pass target.
- T-MAC: CPU Renaissance via Table Lookup for Low-Bit LLM Deployment on EdgearXiv (MSRA)· 2024· 一手· arxiv-2407-00088
Same MSRA group that produced BitBLAS and drove TileLang's early low-precision kernels. Useful for the origin story: TileLang grew out of a line of work on low-bit operator generation, not out of general-purpose compiler research.
- TileSight: A First-Principles Tile-Centric Analytical GPU Performance Model from Cores to ClustersarXiv· 2026· 一手· arxiv-2607-22432
Tile-centric analytical model; the companion repo lives in the same tile-ai org. Use it when reasoning about *why* a tiling choice wins, instead of guess-and-measure tuning.
- Correct but Slow: An Empirical Study of the GPU Kernel Evaluation Gap in Modern Domain-Specific LanguagesarXiv· 2026· 一手· arxiv-2607-04454
Empirical study of how DSL-generated kernels get evaluated in practice, including TileLang. Useful counterweight for the performance claims in vendor material.
- AKG kernel Agent: A Multi-Agent Framework for Cross-Platform Kernel SynthesisarXiv· 2025· 一手· arxiv-2512-23424
Agentic kernel synthesis across platforms, i.e. the "LLM writes the TileLang" direction. Relevant because TileLang ships an agent-oriented toolchain (see tilelang/tools and the [Ascend] agent PRs in the main repo).
- StreamIndex: Memory-Bounded Compressed Sparse Attention via Streaming Top-karXiv· 2026· 一手· arxiv-2605-02568
Sparse-attention kernel work in the DeepSeek/DSA lineage that is implemented with TileLang-style tile kernels; shows what "frontier operator" means here.
- MISA: Mixture of Indexer Sparse Attention for Long-Context LLM InferencearXiv· 2026· 一手· arxiv-2605-07363
Sibling work to StreamIndex; documents the indexer/sparse-attention operator family that TileLang kernels target in 2026.
- SeerAttention-R: Sparse Attention Adaptation for Long ReasoningarXiv· 2025· 一手· arxiv-2506-08889
Reports its kernels as implemented in TileLang, including what had to be hand-written at the thread level. A concrete example of TileLang as the implementation vehicle for a research result.
- Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse AttentionarXiv (DeepSeek)· 2025· 一手· arxiv-2502-11089
DeepSeek's sparse-attention design; the operator family whose TileLang implementations (deepseek_nsa / dsa_* examples) are among the most demanding in-tree workloads.
语言与中间表示 4
- TVM: An Automated End-to-End Optimizing Compiler for Deep LearningarXiv (OSDI 2018)· 2018· 一手· arxiv-1802-04799
The compiler TileLang is implemented on top of. Reading it explains the schedule/compute separation, the Halide-derived IR, and why TileLang can reuse TVM's lowering and target machinery instead of writing its own.
- TensorIR: An Abstraction for Automatic Tensorized Program OptimizationarXiv (ASPLOS 2023)· 2022· 一手· arxiv-2207-04296
Defines the block/axis IR that TileLang emits into. Inductor, TVM 0.9+ and TileLang all speak this dialect, so it is the vocabulary in which TileLang passes (layout inference, pipeline transform, warp specialization) are written.
- Ansor: Generating High-Performance Tensor Programs for Deep LearningarXiv (OSDI 2020)· 2020· 一手· arxiv-2006-06762
The search-based auto-scheduling line of TVM. TileLang's autotuner inherits its split/reorder/fuse vocabulary, so this is the right background for understanding what TileLang deliberately does *not* do (it keeps the user in control of the tiling decision).
- Tensor Program Optimization with Probabilistic ProgramsarXiv (NeurIPS 2022, MetaSchedule)· 2022· 一手· arxiv-2205-13603
The design behind TVM's MetaSchedule, which TileLang's autotuner sits on. Explains trace-based scheduling and the cost-model/search machinery that TileLang reuses for `autotune` runs on real hardware.