Pull Request已成功合入, 合并人@CANN-robot
(感谢 init__zhb__ 的贡献)变更摘要
该 PR 将 19MLA 算子的 Optest 测试件(tests/optest/kernels/19_mla/mla_kernel.cpp 与 tests/optest/kernels/19_mla/tiling/mla_tiling.cpp)与样例侧对齐(参考 PR#794):Tiling 侧更新 KVSplit 判定并新增前缀和任务映射表,Kernel 侧将进程调度从旧版 kerFlag/isForward 往返分发升级为基于前缀和表的 CUTASK_START_OFFSET 映射方式。
主要改动
KVSplit判定条件更新:GetKVSplitParam中新增tilingHost[TILING_MAX_KVSEQLEN] >= blockDim * KV_SEQLEN_SLICE * NUM2作为切分前提,长序列不足时不再切分 KV;不切分路径显式写入tilingHost[TILING_PROCESSNUM] = 0,并补充kvSeqLen == 0时kvSplitPerCore/kvSplitCoreNum的兜底赋值。- Tiling 侧新增前缀和任务表: 切分路径改为 T+1 式平衡切分,引入
MIN_TOKENS_PER_SPLIT与MAX_SPLIT_PER_TASK贪心分配核心并生成累计任务前缀和写入CUTASK_START_OFFSET,将总任务数写入tilingHost[TILING_PROCESSNUM],函数返回值由mlaInfo.batch * MAX_KV_SPLIT_NUM改为cuTaskVal。 - Kernel 侧进程调度升级:
MLAKernel读取TILING_PROCESSNUM,非零时通过gTiling.GetValue(CUTASK_START_OFFSET + taskIdx)前缀和表直接映射curBatch/curNIdx(主循环与 next 任务预取循环均生效),为零时回退旧版kerFlag/isForward往返分发逻辑,保证不切分场景行为不变。


Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/catlass | ✅ sunhao_hw, longjihui (2/2) | ✅ sunhao_hw (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


compile


文档检查门禁结果:


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_arm | ✅ | >>> |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 开源片段检查 | SCA | ✅ | >>> |
| pre-commit | pre-commit | ✅ | >>> |
| static_check_markdownlint | ✅ | >>> | |
| static_check_link_validity | ✅ | >>> | |
| static_check_resource_check | ✅ | >>> | |
| static_check_codespell_check | ✅ | >>> | |
| static_check_tag_closed_check | ✅ | >>> | |
| 开发者测试 | UT_arm | ✅ | >>> |
| UT_IR_Test | ✅ | >>> | |
| UT_lit_Test | ✅ | >>> | |
| 流水线 | PR-pipeline_catlass | ✅ | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


/lgtm


The following label is not ready.
ci-pipeline-passed: The ci-pipeline-passed label is expired as added over 72 hours. Please use /compile to recompile.


compile


| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_arm | ✅ | >>> |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 开源片段检查 | SCA | ✅ | >>> |
| pre-commit | pre-commit | ✅ | >>> |
| static_check_markdownlint | ✅ | >>> | |
| static_check_link_validity | ✅ | >>> | |
| static_check_resource_check | ✅ | >>> | |
| static_check_codespell_check | ✅ | >>> | |
| static_check_tag_closed_check | ✅ | >>> | |
| 开发者测试 | UT_arm | ✅ | >>> |
| UT_IR_Test | ✅ | >>> | |
| UT_lit_Test | ✅ | >>> | |
| 流水线 | PR-pipeline_catlass | ✅ | >>> |
- compile : 运行流水线
- retry : 重试流水线所有失败子任务
- retry <任务名> : 仅重试指定失败子任务
- stop : 停止流水线


描述
与样例侧对齐19MLA算子的Optest测试件(详见commit:
3918a9cb,或查看PR#794)。包括:KVSplit判断,对齐tilingHost[TILING_MAX_KVSEQLEN] >= blockDim * KV_SEQLEN_SLICE * NUM2TILING_PROCESSNUM和CUTASK_START_OFFSET)Referrence:PR#794
关联的Issue
https://gitcode.com/cann/catlass/issues/432
原因
测试
自验200例 ATK 回归测试通过。
文档更新
类型标签