| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
Retain the DLPack producer in tla.from_dlpack Co-authored-by: Alessio<alessio.russo@h-partners.com> # message auto-generated for no-merge-commit merge: !1139 merge fix-dlpack-lifetime into master Retain the DLPack producer in tla.from_dlpack Created-by: arusso Commit-by: Alessio Merged-by: cann-robot Description: ## 描述 from_dlpack parses the dltensor capsule with borrowed fields (the capsule deleter is never invoked) and kept only data_ptr on the returned _Tensor, so nothing kept the DLPack producer alive. The returned tensor now stores a reference to the source object in a new _Tensor._dlpack_source field, so the producer lives at least as long as the tensor borrowing its device buffer. This matches the ownership semantics callers expect from zero-copy wrappers such as torch.from_dlpack. The from_dlpack docstring now states the lifetime guarantee explicitly and names tla.from_dlpack(x.contiguous().to(device), ...) as a safe pattern. ## 关联的Issue N/A ## 原因 A temporary source such as tla.from_dlpack(x.contiguous().to(device), layout_tag=...) was freed right after the call, and the kernel then read whatever had since been allocated at that address. The failure mode is silent: no crash and no warning, just wrong numbers, which makes it expensive to diagnose from a kernel result alone. ## 测试 On device (bz-a5, Ascend950PR, NPU 4): a basic_vadd repro that hands from_dlpack only temporaries, drops them, forces reuse of the freed device memory with 64 junk allocations, then runs the kernel — with the fix the max abs diff versus the golden is 0.0 (PASS). The same repro with the retained reference cleared (emulating the previous behavior) reports a max abs diff of 2007.9 (FAIL), reproducing the silent-wrong-numbers bug on device. pytest tests/test_dlpack_bridge.py on the box: 2 passed, including the new test_from_dlpack_keeps_producer_alive, which weakrefs the producer, drops the caller's only reference, asserts it survives while the tensor lives, and asserts it is released once the tensor dies. pytest tests/test_host_tensor_construction.py tests/test_tensor_types.py also ran clean on the box (exit 0). ## 文档更新 The from_dlpack docstring in python/tla_dsl/catlass/tla/runtime.py documents the borrow-and-retain lifetime contract. ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!1139 | 1 个月前 | |
Stop TlaTensorToMemref from building memref reshapes and casts the verifier rejects Co-authored-by: Alessio<alessio.russo@h-partners.com> # message auto-generated for no-merge-commit merge: !1140 merge fix-cast-memref-compat into master Stop TlaTensorToMemref from building memref reshapes and casts the verifier rejects Created-by: arusso Commit-by: Alessio Merged-by: cann-robot Description: ## 描述 Every memref builder in TlaTensorToMemref.cpp picked its op from the operand shapes alone and then constructed it unconditionally. When the requested adaptation was not representable, the resulting op escaped the pass and failed later in the verifier, and by then the tensor op that originated it was no longer anywhere in the diagnostic. The reachable case comes from the base-versus-view distinction. materializeBaseMemref returns the *base* of a tile by contract — materializeFlatReinterpretSubview is the companion that rebuilds the slice — so a tla.tile_view captured by a vector region asks the helper to cast the full buffer to the narrower view, for example memref<16xi32> to memref<8xi32, strided<[1], offset: ?>>. That produced 'memref.cast' op ... are cast incompatible against an op the user never wrote. Three distinct instances of the same defect are fixed: - The fallthrough memref.cast in castMemrefToExpected was entirely unguarded — this is the one reproduced on device. - castMemrefToType, the sibling helper backing the descriptor copy/mmad path via materializeDescriptorBaseMemref, had the identical unguarded cast. - The two reshape branches were guarded only on element count, which says nothing about layout: a tile that keeps its parent's row pitch is not collapsible at all, and matching element counts do not make the expected type the one expand_shape actually produces. Each builder is now gated on the memref dialect's own legality predicate rather than on hand-written shape rules — areCastCompatible, computeExpandedType, isGuaranteedCollapsible and computeCollapsedType — and the helper returns failure() when the adaptation cannot be represented. The collapse branch also stops guessing its own result type and asks computeCollapsedType for it. Because every guard is a check the verifier already applies, the change can only refuse IR that would have failed verification anyway; no input that previously compiled stops compiling. One consequence worth noting for review: the caller reports failure() through notifyMatchFailure, so the user now sees failed to legalize operation 'tla.load' anchored on their own op and source line instead of a verifier error about a synthesized cast. That is better provenance but still does not state the reason. Saying why would mean promoting that notifyMatchFailure to a hard emitError, which would deny other patterns a chance at the op, so it is deliberately left out of this change. ## 关联的Issue N/A ## 原因 A lowering that emits invalid IR and lets the verifier report it produces a diagnostic with no provenance: it names a synthesized memref.cast and the two memref types, and nothing that points back at the tla.tile_view or the vector region that caused it. Failing in the helper was already available and in keeping with its style — it returns FailureOr<Value> and already returns failure() for a non-memref source — it simply was not done on this path. ## 测试 Reproduced the original defect first, to confirm it was real rather than theoretical: a minimal tla.tile_view of a memref-backed 16-element buffer captured by a vector region, compiled against the pre-fix base (c04d9bbe) on bz-a5, emits exactly 'memref.cast' op operand type 'memref<16xi32, #hivm.address_space<ub>>' and result type 'memref<8xi32, strided<[1], offset: ?>, #hivm.address_space<ub>>' are cast incompatible. The same input against the fixed build is refused cleanly, with no verifier error. On the final build of this branch on bz-a5 (Ascend950PR): - lit: 125/125 pass, including the new regression test. - pytest: full suite passes (exit code 0). - Reference kernels on NPUs 7 and 2: basic_vadd, basic_matmul and basic_mixed all report passed=True. - A second hand-written case exercising the descriptor path that castMemrefToType now guards (a tla.tile_view with a GM-to-UB tla.copy) still compiles clean, confirming the new guard does not reject a legitimate adaptation. The reshape-branch guards are reachable by inspection rather than by a reproduced case, and are stated as such. They are still safe to add because the guards are the verifier's own predicates. ## 文档更新 N/A — no user-facing surface changes. The reasoning is captured in code comments at each guarded builder and in the new lit test. ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!1140 | 1 个月前 | |
Add the int8 x int8 -> int32 data type route to tla.mmad Co-authored-by: Alessio<alessio.russo@h-partners.com> # message auto-generated for no-merge-commit merge: !1120 merge mmad-int8 into master Add the int8 x int8 -> int32 data type route to tla.mmad Created-by: arusso Commit-by: Alessio Merged-by: cann-robot Description: ## 描述 tla.mmad previously routed only f16, bf16 and f32 operands, all accumulating into an fp32 L0C. This adds i8 x i8 -> i32, which the cube supports through the same non-MX mad intrinsic the float routes already use. The device wrapper is a single Catlass::Gemm::Mmad<int8_t, int8_t, int32_t> instantiation alongside the existing three, exposed as mmad_int8_int8_int32. TlaCubeRegionPass gains one more branch in the element-type routing to select it, and core_api.py adds ("i8", "i8", "i32") to the tla.mmad element-type contract. The bc layer registers the int8 operand copies the route needs: GM->L1 in zN and nZ, and L1->L0A / L1->L0B in both orientations. The one structural difference from every existing route is the accumulator: int8 accumulates into an **i32** L0C rather than fp32. Every copy out of L0C therefore had to stop assuming an fp32 accumulator. That contract is now expressed once and applied to all four L0C routes (GM, UB row-major, UB column-major, L1 zN): cpp // Whether fixpipe can carry this L0C element type out to the given destination // type. An fp32 accumulator (the float MMAD routes) may be narrowed to f16/bf16 // on the way out; an i32 accumulator (the int8 MMAD route) has no narrowing path // and must land as i32. static bool isLegalFixpipeElementType(StringRef srcElementType, StringRef dstElementType); Each of those exits is registered for int32_t -> int32_t, so the integer route has the same shape as the float ones: L0C -> GM, L0C -> UB (NO_SPLIT / SPLIT_M / SPLIT_N, both layouts) and L0C -> L1 (zN). The frontend enforces the matching rule for callers: an i32 accumulator may only be copied out as i32, while an fp32 one keeps its existing [f32, f16, bf16] choice. basic_matmul.py gains the route as a data-type choice: --dtype-a i8 --dtype-b i8 --dtype-c i32. The kernel takes an acc_is_int Constexpr and allocates the L0C tile as tla.Int32 when set; the host generates small integer operands, builds an exact int32 reference, and compares with element-wise equality instead of a tolerance. ## 关联的Issue N/A ## 原因 The DSL exposed only three of the operand formats the cube supports, which blocked int8-quantised workloads from being written in it. int8 is the cheapest of the missing formats to add: it needs no microscaling machinery, no sub-byte packing and no new element type, since i8 and i32 already exist in the DSL. CATLASS already selects an int32_t accumulator for this operand pair, so the device side is a single template instantiation. ## 测试 lit, in mmad-runtime-from-python.test, with both inputs emitted from legal @tla.kernel functions rather than hand-written IR: - an I8 case asserting the lowering reaches @mmad_int8_int8_int32 and that no tla.mmad survives; - an I8FIX case exercising every exit from the i32 accumulator in one kernel, asserting each copy resolves to an int32_t -> int32_t callee — copy_l0c_to_gm_row_major_int32_t, copy_l0c_to_ub_row_major_splitm_int32_t, copy_l0c_to_l1_zN_int32_t — and that no tla.mmad / tla.copy survives. This is what guards the shared fixpipe predicate: an i32 accumulator must never pick one of the fp32 callees. On-device, basic_matmul.py --dtype-a i8 --dtype-b i8 --dtype-c i32 runs the route end to end and checks the result with torch.equal against an exact int32 reference; integer MMAD is exact, so any tolerance would mask a defect. The example rejects a partial integer selection (--dtype-a i8 without i8/i32 on the other two), so the route cannot be entered half-configured. Full suites: pytest 1494 passed / 7 skipped, lit 124/124. ## 文档更新 docs/en/kernel_api_reference.md is regenerated, since core_api.py changed and the generated reference embeds source line numbers; the diff is limited to those mechanical Source: links. No new API surface is introduced, so there is no new entry: i8 operands with an i32 accumulator are a data-type choice on the existing tla.mmad, not a new op or parameter. The one thing a caller must know — that the integer route accumulates into an i32 L0C rather than fp32 — is visible in basic_matmul.py, which selects the L0C element type accordingly, and in the tla.mmad error message, which now names the supported element-type combinations including i8,i8 -> i32. ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!1120 | 1 个月前 | |
Add the int8 x int8 -> int32 data type route to tla.mmad Co-authored-by: Alessio<alessio.russo@h-partners.com> # message auto-generated for no-merge-commit merge: !1120 merge mmad-int8 into master Add the int8 x int8 -> int32 data type route to tla.mmad Created-by: arusso Commit-by: Alessio Merged-by: cann-robot Description: ## 描述 tla.mmad previously routed only f16, bf16 and f32 operands, all accumulating into an fp32 L0C. This adds i8 x i8 -> i32, which the cube supports through the same non-MX mad intrinsic the float routes already use. The device wrapper is a single Catlass::Gemm::Mmad<int8_t, int8_t, int32_t> instantiation alongside the existing three, exposed as mmad_int8_int8_int32. TlaCubeRegionPass gains one more branch in the element-type routing to select it, and core_api.py adds ("i8", "i8", "i32") to the tla.mmad element-type contract. The bc layer registers the int8 operand copies the route needs: GM->L1 in zN and nZ, and L1->L0A / L1->L0B in both orientations. The one structural difference from every existing route is the accumulator: int8 accumulates into an **i32** L0C rather than fp32. Every copy out of L0C therefore had to stop assuming an fp32 accumulator. That contract is now expressed once and applied to all four L0C routes (GM, UB row-major, UB column-major, L1 zN): cpp // Whether fixpipe can carry this L0C element type out to the given destination // type. An fp32 accumulator (the float MMAD routes) may be narrowed to f16/bf16 // on the way out; an i32 accumulator (the int8 MMAD route) has no narrowing path // and must land as i32. static bool isLegalFixpipeElementType(StringRef srcElementType, StringRef dstElementType); Each of those exits is registered for int32_t -> int32_t, so the integer route has the same shape as the float ones: L0C -> GM, L0C -> UB (NO_SPLIT / SPLIT_M / SPLIT_N, both layouts) and L0C -> L1 (zN). The frontend enforces the matching rule for callers: an i32 accumulator may only be copied out as i32, while an fp32 one keeps its existing [f32, f16, bf16] choice. basic_matmul.py gains the route as a data-type choice: --dtype-a i8 --dtype-b i8 --dtype-c i32. The kernel takes an acc_is_int Constexpr and allocates the L0C tile as tla.Int32 when set; the host generates small integer operands, builds an exact int32 reference, and compares with element-wise equality instead of a tolerance. ## 关联的Issue N/A ## 原因 The DSL exposed only three of the operand formats the cube supports, which blocked int8-quantised workloads from being written in it. int8 is the cheapest of the missing formats to add: it needs no microscaling machinery, no sub-byte packing and no new element type, since i8 and i32 already exist in the DSL. CATLASS already selects an int32_t accumulator for this operand pair, so the device side is a single template instantiation. ## 测试 lit, in mmad-runtime-from-python.test, with both inputs emitted from legal @tla.kernel functions rather than hand-written IR: - an I8 case asserting the lowering reaches @mmad_int8_int8_int32 and that no tla.mmad survives; - an I8FIX case exercising every exit from the i32 accumulator in one kernel, asserting each copy resolves to an int32_t -> int32_t callee — copy_l0c_to_gm_row_major_int32_t, copy_l0c_to_ub_row_major_splitm_int32_t, copy_l0c_to_l1_zN_int32_t — and that no tla.mmad / tla.copy survives. This is what guards the shared fixpipe predicate: an i32 accumulator must never pick one of the fp32 callees. On-device, basic_matmul.py --dtype-a i8 --dtype-b i8 --dtype-c i32 runs the route end to end and checks the result with torch.equal against an exact int32 reference; integer MMAD is exact, so any tolerance would mask a defect. The example rejects a partial integer selection (--dtype-a i8 without i8/i32 on the other two), so the route cannot be entered half-configured. Full suites: pytest 1494 passed / 7 skipped, lit 124/124. ## 文档更新 docs/en/kernel_api_reference.md is regenerated, since core_api.py changed and the generated reference embeds source line numbers; the diff is limited to those mechanical Source: links. No new API surface is introduced, so there is no new entry: i8 operands with an i32 accumulator are a data-type choice on the existing tla.mmad, not a new op or parameter. The one thing a caller must know — that the integer route accumulates into an i32 L0C rather than fp32 — is visible in basic_matmul.py, which selects the L0C element type accordingly, and in the tla.mmad error message, which now names the supported element-type combinations including i8,i8 -> i32. ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!1120 | 1 个月前 | |
Retain the DLPack producer in tla.from_dlpack Co-authored-by: Alessio<alessio.russo@h-partners.com> # message auto-generated for no-merge-commit merge: !1139 merge fix-dlpack-lifetime into master Retain the DLPack producer in tla.from_dlpack Created-by: arusso Commit-by: Alessio Merged-by: cann-robot Description: ## 描述 from_dlpack parses the dltensor capsule with borrowed fields (the capsule deleter is never invoked) and kept only data_ptr on the returned _Tensor, so nothing kept the DLPack producer alive. The returned tensor now stores a reference to the source object in a new _Tensor._dlpack_source field, so the producer lives at least as long as the tensor borrowing its device buffer. This matches the ownership semantics callers expect from zero-copy wrappers such as torch.from_dlpack. The from_dlpack docstring now states the lifetime guarantee explicitly and names tla.from_dlpack(x.contiguous().to(device), ...) as a safe pattern. ## 关联的Issue N/A ## 原因 A temporary source such as tla.from_dlpack(x.contiguous().to(device), layout_tag=...) was freed right after the call, and the kernel then read whatever had since been allocated at that address. The failure mode is silent: no crash and no warning, just wrong numbers, which makes it expensive to diagnose from a kernel result alone. ## 测试 On device (bz-a5, Ascend950PR, NPU 4): a basic_vadd repro that hands from_dlpack only temporaries, drops them, forces reuse of the freed device memory with 64 junk allocations, then runs the kernel — with the fix the max abs diff versus the golden is 0.0 (PASS). The same repro with the retained reference cleared (emulating the previous behavior) reports a max abs diff of 2007.9 (FAIL), reproducing the silent-wrong-numbers bug on device. pytest tests/test_dlpack_bridge.py on the box: 2 passed, including the new test_from_dlpack_keeps_producer_alive, which weakrefs the producer, drops the caller's only reference, asserts it survives while the tensor lives, and asserts it is released once the tensor dies. pytest tests/test_host_tensor_construction.py tests/test_tensor_types.py also ran clean on the box (exit 0). ## 文档更新 The from_dlpack docstring in python/tla_dsl/catlass/tla/runtime.py documents the borrow-and-retain lifetime contract. ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!1139 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
dsl: 补充迁移时收口的测试样例并纳入 hf32 相关测试 Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> # message auto-generated for no-merge-commit merge: !1143 merge restore/dsl-samples-tests-hf32 into master dsl: 补充迁移时收口的测试样例并纳入 hf32 相关测试 Created-by: CheaterAbec Commit-by: cann-robot;CheaterAbec Merged-by: cann-robot Description: ## 描述 在 CATLASS DSL 合入 master(!1122)时,公开树收口删除了 python/tla_dsl/tests/ 与部分未就绪 / 非中文 README 的 e2e 样例。本 PR 在当前 master(已含 hf32 运行时支持,见 !1133 / dsl@4f335a2e)上: 1. **补回** 此前收口去掉的 pytest / lit 测试树与相关 e2e 样例(debug_print、print_tensor、simt、tensor_index、dataclass_arg、lazy_conditions、scalar_arg_alignment、cross_flag_two_way 等);**仍不带入** block_sparse_attention(BSA); 2. **同步纳入** dsl 分支 4f335a2e(hf32 support)携带的测试:mmad-hf32-mode.mlir / mmad-hf32-mode-verify.test、以及 tests/test_frontend_lowering.py 中的 hf32 用例; 3. 恢复文档 / pyproject.toml / tests/dsl_battery / tests/run_dsl_test.sh 中对应入口,并与 master 上 basic_mmad_epilogue 命名保持一致。 **未改动** master 已落地的 hf32 运行时与 basic_matmul / common/golden.py / common/utils.py 等端到端实现(以 !1133 为准)。 ### 源分支 - cann/catlass:restore/dsl-samples-tests-hf32(基于 master @ 769cd40a) - tip:e8e24273 — dsl: restore pytest/lit and e2e samples, include hf32 tests ### MR https://gitcode.com/cann/catlass/merge_requests/1143 ## 关联的Issue 无。 ## 原因 迁移合入时为降低公开树噪音暂时下架了全量单测与部分样例;现 master 已具备 hf32 能力,需要把测试样例与 hf32 相关回归一并补回,便于主线持续验证。 ## 测试 - [ ] cd python/tla_dsl && ./build.sh 后:python -m pytest -q tests - [ ] python -m pytest -q tests/test_frontend_lowering.py -k hf32 - [ ] lit -sv csrc/mlir/build/tests/lit --filter=mmad-hf32-mode - [ ] bash tests/run_dsl_test.sh --device <id>(含补回样例) ## 文档更新 - 恢复 python/tla_dsl/README.md 与开发指南中对 pytest / lit / 仓库级回归的入口说明 - 在 01_build_and_test.md 补充 hf32 相关 pytest / lit 过滤命令 ## 类型标签 - [x] 其他:测试样例 / 单测树补充 See merge request: cann/catlass!1143 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
dsl: 补充迁移时收口的测试样例并纳入 hf32 相关测试 Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> # message auto-generated for no-merge-commit merge: !1143 merge restore/dsl-samples-tests-hf32 into master dsl: 补充迁移时收口的测试样例并纳入 hf32 相关测试 Created-by: CheaterAbec Commit-by: cann-robot;CheaterAbec Merged-by: cann-robot Description: ## 描述 在 CATLASS DSL 合入 master(!1122)时,公开树收口删除了 python/tla_dsl/tests/ 与部分未就绪 / 非中文 README 的 e2e 样例。本 PR 在当前 master(已含 hf32 运行时支持,见 !1133 / dsl@4f335a2e)上: 1. **补回** 此前收口去掉的 pytest / lit 测试树与相关 e2e 样例(debug_print、print_tensor、simt、tensor_index、dataclass_arg、lazy_conditions、scalar_arg_alignment、cross_flag_two_way 等);**仍不带入** block_sparse_attention(BSA); 2. **同步纳入** dsl 分支 4f335a2e(hf32 support)携带的测试:mmad-hf32-mode.mlir / mmad-hf32-mode-verify.test、以及 tests/test_frontend_lowering.py 中的 hf32 用例; 3. 恢复文档 / pyproject.toml / tests/dsl_battery / tests/run_dsl_test.sh 中对应入口,并与 master 上 basic_mmad_epilogue 命名保持一致。 **未改动** master 已落地的 hf32 运行时与 basic_matmul / common/golden.py / common/utils.py 等端到端实现(以 !1133 为准)。 ### 源分支 - cann/catlass:restore/dsl-samples-tests-hf32(基于 master @ 769cd40a) - tip:e8e24273 — dsl: restore pytest/lit and e2e samples, include hf32 tests ### MR https://gitcode.com/cann/catlass/merge_requests/1143 ## 关联的Issue 无。 ## 原因 迁移合入时为降低公开树噪音暂时下架了全量单测与部分样例;现 master 已具备 hf32 能力,需要把测试样例与 hf32 相关回归一并补回,便于主线持续验证。 ## 测试 - [ ] cd python/tla_dsl && ./build.sh 后:python -m pytest -q tests - [ ] python -m pytest -q tests/test_frontend_lowering.py -k hf32 - [ ] lit -sv csrc/mlir/build/tests/lit --filter=mmad-hf32-mode - [ ] bash tests/run_dsl_test.sh --device <id>(含补回样例) ## 文档更新 - 恢复 python/tla_dsl/README.md 与开发指南中对 pytest / lit / 仓库级回归的入口说明 - 在 01_build_and_test.md 补充 hf32 相关 pytest / lit 过滤命令 ## 类型标签 - [x] 其他:测试样例 / 单测树补充 See merge request: cann/catlass!1143 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 | |
CATLASS_DSL代码迁移 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> Co-authored-by: yjp-hw<yanjiapeng1@huawei.com> Co-authored-by: CheaterAbec<niyuhao2@huawei.com> Co-authored-by: cann-robot<cann@cann.team> Co-authored-by: yuantao_<yuantao313@outlook.com> Co-authored-by: WinstonSmith<yukainan1@huawei.com> Co-authored-by: zjw666888<zhoujianwei4@huawei.com> Co-authored-by: weixin_42818618<zhusongxiang1@huawei.com> Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: arusso<alessio.russo@h-partners.com> Co-authored-by: tianxinghui<tianxinghui@huawei.com> Co-authored-by: mdrumond<mario.paulo.oliveira@huawei.com> # message auto-generated for no-merge-commit merge: !1122 merge master into master CATLASS_DSL代码迁移 Created-by: CheaterAbec Commit-by: CheaterAbec;yjp-hw;cann-robot;init__zhb__;zjw666888;yuantao_;tianxinghui;mdrumond;liyuanqiang;longjihui;arusso;weixin_42818618;wmg1;llqx-1;oscillated;lijiaming_hw;WinstonSmith;yuantao Merged-by: cann-robot Description: ## 描述 将 **cann/catlass dsl 分支**上的 TLA DSL(python/tla_dsl 及相关配套)合入 **master**,使 master 具备可构建、可运行的 Python TLA DSL 能力,同时保证仓根 C++ 头文件与当前 master 一致、不引入额外 include/ 改动。 ### 迁移起点 - **源分支**:cann/catlass 的 dsl 分支 - **源 tip(迁移起点)**:38128c8ce076b2ec9132d1cc10495e2852906715 - subject:文档内容低错整改与优化润色 - **目标基线**:合入时的 master tip 3dc2547f4762a0526da687a4498a74e195dfe2e2 - subject:feat(tile): add Ascend950 L0C-to-UB ColumnMajor specialization - **分叉点(merge-base)**:cc8edbd2122d5b71ccb45e9052ae8b8303b6131d - 自 merge-base 起,dsl 相对 master 约有 **192** 个独有提交;本 PR 以 rebase 方式重放这些提交(保留原作者),再叠一层公开树收口。 ### 迁移做法 1. 以 dsl tip 38128c8c 为源,将其相对 merge-base 的提交 **rebase** 到当时最新 master(3dc2547f),保留原 commit 作者信息。 2. 冲突处理策略: - **python/tla_dsl/****:保留 DSL 侧改动; - **非 python/tla_dsl 路径**(如 .gitignore / pre-commit / 仓根 docs / 仓根测试脚本、以及仓根 include/ 等):**一律以 master 为准**; - 因此本 PR **不携带** 相对 master 的仓根 include/ diff(L0C→UB ColumnMajor 等 C++ tile 特化已在 master,例如 !1124)。 3. DSL 侧额外保留端到端回归入口:tests/dsl_battery、tests/run_dsl_test.sh,以及必要的 .gitmodules。 4. 相对 dsl 做公开树收口(见下节「相比 dsl 的删减」),避免未就绪样例与全量单测树进入 master。 ### 相比 dsl 分支的删减 相对迁移起点 38128c8c,本 PR **额外删除 / 不带入** 以下内容: 1. **整棵** python/tla_dsl/tests/(含 pytest 与 lit),公开树不再提供全量单测 / lit 入口。 2. **未就绪或不完整的 e2e 样例**(python/tla_dsl/examples/end_to_end/ 下): - 无 README:dataclass_arg、lazy_conditions、scalar_arg_alignment、simt、tensor_index - 仅英文 README:cross_flag_two_way、debug_print、print_tensor - BSA:block_sparse_attention 3. 同步裁剪 tests/dsl_battery、tests/run_dsl_test.sh 以及 python/tla_dsl 文档 / README / pyproject.toml 中对上述测试与样例的入口说明。 **仍保留的 e2e**:basic_mixed、basic_mmad、basic_mmad_evg、basic_mmad_streamk、basic_vadd、batched_matmul、flash_attention_infer、grouped_matmul_slice_m、multi_core_splitk_matmul、vector_ops,以及共享目录 common。 ## 关联的Issue 无。 ## 原因 dsl 分支长期承载 TLA DSL 开发,需将其合入 master,便于主线使用与后续演进;合入时要求: - 保留 DSL 提交历史与作者; - 不扰动已在 master 落地的仓根 C++ / tile 特化; - 公开树只带可对外展示的 DSL 能力与中文 README 样例,去掉全量单测树与未就绪样例,降低主线噪音与维护面。 类型上属于「将 dsl 上的 TLA DSL 能力迁移合入 master」,并附带文档与样例收口。 ## 测试 本地环境:CANN 9.1.0-B070 + AscendNPU-IR,conda ascend-catlass-dsl。 - [x] python/tla_dsl:./build.sh --clean 通过 - [x] 公开树 e2e:仓根 tests/run_dsl_test.sh --device 5 → **156 passed** - [x] 确认相对合入基线 master:git diff <master-tip> -- include/ 为空 - [x] (基于 dsl 完整测试树的本地验证,不进入本 PR 公开树)pytest:**1479 passed, 7 skipped**;lit:**122 passed** ## 文档更新 - 更新 / 收敛 python/tla_dsl 侧 README、开发指南与相关文档中的测试 / 样例入口(去掉已删除的 pytest/lit 与下架 e2e 引用)。 - 保留并继续引用仍在树内的样例(如 vector_ops 等)。 - **未**改动仓根 AGENTS.md、仓根默认 build.sh / CI 对 tests/ 的策略说明(DSL 构建走 python/tla_dsl/build.sh)。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [x] 其他,请描述:将 dsl 分支 TLA DSL 以 rebase 方式合入 master,并相对 dsl 删减公开树单测与未就绪 e2e See merge request: cann/catlass!1122 | 1 个月前 |
CATLASS DSL
CATLASS DSL 是 CATLASS 的 Python 前端。它在 AscendNPU-IR 的基础上构建 TLA Dialect,将 Python 中描述的 TLA 操作降级为 MLIR,并由 AscendNPU-IR 工具链编译为可执行的核函数产物。
目前,CATLASS DSL 主要对 TLA 框架提供了DSL封装,可以使用tla.make_tensor等API来描述TLA操作,完成算子的实现。未来,我们将继续扩展CATLASS DSL,在全量支持TLA tensor抽象接口、矩阵向量计算等接口的基础之上,进行类似CATLASS 模板的封装,实现对齐CATLASS C++模板算子的开发体验。
文档
- 环境准备:环境要求及安装入口。
- 编译与测试:构建、pytest、lit 和端到端用例。
- API 文档:生成并预览 API 文档。
- AscendNPU-IR 构建:手动构建AscendNPU-IR。
- 手动 CMake 构建:直接配置
csrc/mlir的进阶用法。
快速开始
先按照环境准备完成安装,并按构建 AscendNPU-IR预先构建依赖,同时设置 CATLASS_DSL_PREBUILT_ASCENDNPU_IR。build.sh 本身不会构建 AscendNPU-IR。
下文命令均在 DSL 子项目根目录执行,其中 /path/to/catlass 需替换为你 clone 的 CATLASS 仓库根目录:
cd /path/to/catlass/python/tla_dsl
1. 构建
./build.sh
build.sh 默认执行 Debug 开发构建:检查 AscendNPU-IR 构建产物、生成 TLA Python op 绑定、在 csrc/mlir/build 构建 TlaCompile 与类型桥接动态库,并以 editable 模式安装 ascend-catlass-dsl。
2. pytest(DSL 单元测试)
python -m pytest -q tests
3. lit(编译器回归测试)
lit -sv csrc/mlir/build/tests/lit
4. NPU 端到端示例(需要 NPU)
python examples/end_to_end/basic_mmad/basic_matmul.py --device 0
更多构建选项(Release wheel、清理重建)、单测入口与仓库级回归的说明见编译与测试。
兼容性
CATLASS DSL 各版本支持的硬件平台及所需的最低 CANN 版本如下表:
| CATLASS DSL 版本 | 最低支持 CANN 包版本 | 支持昇腾产品 |
|---|---|---|
| 当前 | >= 9.1.0 |
Ascend 950PR / Ascend 950DT |
软硬件环境要求:
- CPU 架构:
aarch64/x86_64 - 系统:CANN 支持的 Linux
- 软件依赖:Python
>= 3.10, < 3.14、CMake>= 3.28, < 4.0、Ninja>= 1.12、Clang / Clang++>= 10(构建 AscendNPU-IR 时;推荐 19)、lld、lit、FileCheck 与 LLVM 配套、AscendNPU-IRfeature/regbase@a07821269…
完整的环境要求与安装方式见环境准备。
目录概览
python/tla_dsl/
├── 3rdparty/AscendNPU-IR/ # AscendNPU-IR 子模块
├── catlass/ # Python 前端与运行时
├── csrc/mlir/ # TLA Dialect 与编译器实现
├── docs/zh/ # 中文文档
├── docs/en/ # 英文文档
├── examples/ # 端到端示例
├── tests/ # 单元、lit 与端到端测试
├── Dockerfile # 开发环境镜像定义
├── build_docker_image.sh # 镜像构建入口
├── build.sh # 项目构建入口
└── requirements.txt # 非 CANN Python 依赖