Skip to content

Commit 7a8cc01

Browse files
committed
.asc and .cce enter the device-source table, and the CANN toolkit turns out to be one download
The Ascend example named an `xim:cann-toolkit` that did not exist and a device extension the engine did not know. Both are now answerable, and the answer to the second was simpler than the design doc said. THE EXTENSION. `.asc` is Ascend C, compiled by `ccec` (BiSheng) from the CANN toolkit, and `.cce` is the older spelling of the same thing. They belong in the table for the reason `.sycl` does: the content is ordinary C++ and the criterion is the compiler. CANN's own operator libraries already split `op_kernel/` from `op_host/`, and CMake registers ASC as a language of its own -- the island is a shape Ascend already has, not one mcpp imposes on it. Adding to this table cannot change a build that works today: device extensions are absent from the default source glob, and one named in `sources` was until now a hard error. THE TOOLKIT. The design doc recorded that the vendor's container image pulls anonymously, which is true and is not the simplest route -- it stopped one layer short. Measured today, with no credentials at all: every toolkit from 8.0.RC1 to 8.5.0 is a plain `.run` on Huawei's own OBS, answering 200 to a HEAD request. 8.5.0 is 1.12 GB for x86_64 and 1.10 GB for aarch64. It installs without root and without a driver: ./Ascend-cann-toolkit_8.5.0_linux-x86_64.run --install \ --install-path=<dir> --quiet and 2.9 GB later the two pieces the lane needs are both there: `x86_64-linux/ccec_compiler/bin/{ccec,bisheng}` runs and reports clang 15.0.5, and `x86_64-linux/simulator/` carries 38 SoC directories, each with its own `libpem_davinci.so`. So the whole lane -- compiler and a hardware-free way to run what it produces -- is one anonymous download. The installer writes two things outside its install path, `~/Ascend` (8 KB, an install record) and `~/var/log/ascend_seclog`. Measured: overriding `HOME` for the duration contains both, and the payload installs identically, so a package recipe need not be a bad citizen of the user's home directory. This settles what the design doc listed as the lane's only remaining prerequisite. Compliance-wise it sits in the first tier of the standing rule -- closed-source and not redistributable, so it is fetched from the vendor's own URL with no CN mirror, which costs nothing here because the vendor's URL is already in-country. Verified after the mcpp-plugins 0.2.2 release: the multi-backend example now resolves the PUBLISHED `mcpp:plugins@0.2.2` from the index with no path override and no lock file, and runs -- `backend: cpu` with no accelerator and `backend: cuda` on a real device.
1 parent 4a68363 commit 7a8cc01

4 files changed

Lines changed: 36 additions & 1 deletion

File tree

.agents/docs/2026-09-07-general-build-infrastructure-gaps-design.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,32 @@ C6 值得单独说明:它是这批里唯一无法在开发机上验证的判据
769769
**这一项不是引擎工作量,是判断整套设计对不对的实验。** 它的产出是一份带判据的报告
770770
加一个规则包(§10.6),不是一个要长期维护的 fork。
771771

772+
## 14b. 昇腾工具包的取得路径(修订八:比修订三所写的更简单)
773+
774+
修订三的结论是"官方镜像可匿名拉取",这仍然成立,但它不是最简的那条路,而当时没有再往下
775+
找一层。实测(2026-09-07,HEAD 请求,无任何凭据):
776+
777+
| 版本 | `Ascend-cann-toolkit_<ver>_linux-x86_64.run` | 大小 |
778+
|---|---|---|
779+
| 8.0.RC1 / 8.0.RC2 / 8.0.0 | 200 | 1.95 / 2.00 / 2.07 GB |
780+
| 8.1.RC1 | 200 | 2.16 GB |
781+
| 8.2.RC1 / 8.3.RC1 | 200 | 2.30 / 2.44 GB |
782+
| 8.5.0 | 200 | 1.12 GB |
783+
784+
URL 形如
785+
`https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%20<ver>/Ascend-cann-toolkit_<ver>_linux-x86_64.run`
786+
787+
这条路径把 `xim:cann-toolkit` 从"要在配方里走 docker registry 的 token 握手、拉 10 个层、
788+
再从层里刨目录"降成"下载一个 `.run`、非交互安装、导出目录" —— 而索引里已有 `.run` 安装
789+
器的先例(`qemu-user-aarch64`),docker 拉取则一个先例都没有(`openclaw` 里那条是别的
790+
东西)。**没有先例的机制不是不可以引入,但在有先例的机制够用时引入它是净损失。**
791+
792+
合规上这落在用户既定不变量的第一档:**闭源、不可再分发的东西从厂商自有 URL 直取,不做
793+
CN 镜像**。厂商 URL 本身就在国内,所以镜像这一层在这里也没有意义。
794+
795+
一个记法上的更正:修订三写的是"毕昇与模拟器在同一个包里,是一个获取问题不是两个"。这仍然
796+
对,但"那个包"现在指的是这个 `.run`,不是那个镜像。
797+
772798
## 15. 第二个后端才暴露的五处缺口(修订七)
773799

774800
前十四节的缺口清单来自**读代码****一个后端的实践**。写第二个后端的时候,五处新缺口

docs/20-heterogeneous-builds.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ does not accept C++20 modules.
8787
|---|---|
8888
| CUDA, HIP | `.cu`, `.hip` |
8989
| SYCL | `.sycl` (2026.9.6.1+) |
90+
| Ascend C | `.asc`, `.cce` (2026.9.6.5+) |
9091
| GLSL, by stage | `.comp`, `.vert`, `.frag`, `.geom`, `.tesc`, `.tese`, `.mesh`, `.task`, `.rgen`, `.rint`, `.rahit`, `.rchit`, `.rmiss`, `.rcall` |
9192
| GLSL, stage-less | `.glsl` |
9293
| HLSL | `.hlsl` |

docs/zh/20-heterogeneous-builds.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ C++20 modules 的编译器。
7070
|---|---|
7171
| CUDA、HIP | `.cu``.hip` |
7272
| SYCL | `.sycl`(2026.9.6.1+) |
73+
| Ascend C | `.asc``.cce`(2026.9.6.5+) |
7374
| GLSL(按 stage) | `.comp``.vert``.frag``.geom``.tesc``.tese``.mesh``.task``.rgen``.rint``.rahit``.rchit``.rmiss``.rcall` |
7475
| GLSL(无 stage) | `.glsl` |
7576
| HLSL | `.hlsl` |

modules/source-kind/src/source_kind.cppm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,15 @@ constexpr std::string_view kHeaderExtensions[] = { ".h", ".hpp", ".hh", ".hxx" }
264264
// extension, so a rule package refuses a stage-less name — which is the right
265265
// place for that message, and the reason this table does not need to know
266266
// which of these extensions name a stage.
267+
//
268+
// `.asc` is Ascend C, compiled by `ccec` (BiSheng) from the CANN toolkit. It is
269+
// here for the reason `.sycl` is: the language is ordinary C++ and the
270+
// criterion is the compiler. CANN's own operator libraries already split
271+
// `op_kernel/` from `op_host/`, and CMake registers ASC as a LANGUAGE of its
272+
// own -- so the island is the shape Ascend already has, not one mcpp imposes.
273+
// `.cce` is the older spelling of the same thing and is accepted beside it.
267274
constexpr std::string_view kDeviceExtensions[] = {
268-
".cu", ".hip", ".sycl",
275+
".cu", ".hip", ".sycl", ".asc", ".cce",
269276
".comp", ".vert", ".frag", ".geom", ".tesc", ".tese", ".mesh", ".task",
270277
".rgen", ".rint", ".rahit", ".rchit", ".rmiss", ".rcall",
271278
".glsl", ".hlsl", ".cl", ".metal",

0 commit comments

Comments
 (0)