| SMLA按stride数组指针获取KV stride0 Co-authored-by: weinachuan<weinachuan1@huawei.com> # message auto-generated for no-merge-commit merge: !7403 merge codex/smla-optional-stride into master SMLA按stride数组指针获取KV stride0 Created-by: Wei_NaChuan Commit-by: weinachuan Merged-by: cann-robot Description: ## 描述 SparseFlashMla tiling 中获取 optional input stride 时,按 GetOptionalInputStride / GetInputStride 返回的 stride 数组指针读取第 0 维 stride,判空后使用 stride[0]。同时保留对象型 stride 兼容分支,以及无法获取 stride 时回退连续内存推导的行为。 新增 SMLA stride 调测脚本和一键使用README,构造 BSND + SCFA 场景下 0 轴非连续的 ori_kv 和 cmp_kv,打印输入 stride 信息,并对比非连续 KV view 与 contiguous KV clone 的输出,用于确认内部 CANN 包中新 stride 接口路径生效。 ## 关联的Issue [#3186](https://gitcode.com/cann/ops-transformer/issues/3186) ## 测试 - 执行 git diff --check,通过。 - 执行调测脚本语法检查,通过。 - 编译 sparse_flash_mla 与 sparse_flash_mla_metadata custom 包,通过。 ## 文档更新 新增 SMLA stride 调测脚本使用说明。 ## 类型标签 - [ ] 🐛 Bug修复 - [ ] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [x] 📝 文档更新 - [ ] ⬆️ 依赖升级 - [ ] 🔒 安全修复 - [x] 🧹 代码清理 - [ ] ❓ 其他,请描述: See merge request: cann/ops-transformer!7403 | 1 个月前 |