已合并
同步更新19MLA的optest测试件 #1163
init__zhb__创建于 14 天前
同步更新19MLA的optest测试件 #1163
已合并
init__zhb__创建于 14 天前
init__zhb__成员
14 天前

描述

与样例侧对齐19MLA算子的Optest测试件(详见commit: 3918a9cb,或查看PR#794)。包括:

  • Tiling侧:更新KVSplit判断,对齐tilingHost[TILING_MAX_KVSEQLEN] >= blockDim * KV_SEQLEN_SLICE * NUM2
  • Kernel侧:把进程调度从旧版升级为 prefix-sum table 映射做法(Tiling侧预先准备 TILING_PROCESSNUMCUTASK_START_OFFSET

Referrence:PR#794

关联的Issue

https://gitcode.com/cann/catlass/issues/432

原因

测试

自验200例 ATK 回归测试通过。

image.png

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 init__zhb__ 的贡献)
Iinit__zhb__成员
14 天前 创建了 pull request,commit b284dcc5
Iinit__zhb__成员
14 天前 关联了issue:[Bug-Report|缺陷反馈]: 19_mla存在精度问题
atomgit-bot
atomgit-bot
14 天前 评论:

变更摘要

该 PR 将 19MLA 算子的 Optest 测试件(tests/optest/kernels/19_mla/mla_kernel.cpptests/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 == 0kvSplitPerCore/kvSplitCoreNum 的兜底赋值。
  • Tiling 侧新增前缀和任务表: 切分路径改为 T+1 式平衡切分,引入 MIN_TOKENS_PER_SPLITMAX_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 往返分发逻辑,保证不切分场景行为不变。
likedislike
不准确?
atomgit-bot
atomgit-bot
14 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
14 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
14 天前 评论:

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 /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
14 天前 评论:

CLA Signature Pass

init__zhb__, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
init__zhb__成员
14 天前 评论:

compile

likedislike
Iinit__zhb__成员
14 天前 update merge request[project id: 7631999, iid: 1163, commit_id: 742cd7bd2ceea4aa2ca0b6c5433911f3b28f6663] virtual merging success
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
14 天前 评论:
流水线 PR-pipeline_catlass#2952 [ commitID:469fa839 ] 已完成
>>>代码风格自动修复执行成功(无修复内容)
阶段 任务名 状态 详情
编译构建 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 >>>
此流水线已支持下列评论快捷指令,仅PR创建者和白名单成员[Zhang, Haobo, init__zhb__, tianxinghui]评论有效
  • compile : 运行流水线
  • retry : 重试流水线所有失败子任务
  • retry <任务名> : 仅重试指定失败子任务
  • stop : 停止流水线
likedislike
Iinit__zhb__成员
12 天前 修改了pull request 的描述
Iinit__zhb__成员
12 天前 修改了pull request 的描述
Iinit__zhb__成员
12 天前 修改了pull request 的描述
sunhao_hw成员
12 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:approved
longjihui
longjihui成员
11 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
11 天前 添加了label:lgtm
CANN-robotCANN-robot成员
11 天前 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
11 天前 评论:

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.

likedislike
init__zhb__成员
11 天前 评论:

compile

likedislike
Iinit__zhb__成员
11 天前 update merge request[project id: 7631999, iid: 1163, commit_id: b64b1036b6958d1c8ce03788756ea615ffa6ea4d] virtual merging success
CANN-robotCANN-robot成员
11 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
11 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
11 天前 添加了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
11 天前 评论:
流水线 PR-pipeline_catlass#3045 [ commitID:469fa839 ] 已完成
>>>代码风格自动修复执行成功(无修复内容)
阶段 任务名 状态 详情
编译构建 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 >>>
此流水线已支持下列评论快捷指令,仅PR创建者和白名单成员[Zhang, Haobo, init__zhb__, tianxinghui]评论有效
  • compile : 运行流水线
  • retry : 重试流水线所有失败子任务
  • retry <任务名> : 仅重试指定失败子任务
  • stop : 停止流水线
likedislike
CANN-robotCANN-robot成员
11 天前 合入了pull request