Skip to content

Branch: smla-only baseline before COMM_PROTOCOL_UBC_CTP ops - #2

Draft
yjyang62 wants to merge 2 commits into
mainfrom
cursor/smla-only-before-ubc-ctp-2c82
Draft

Branch: smla-only baseline before COMM_PROTOCOL_UBC_CTP ops#2
yjyang62 wants to merge 2 commits into
mainfrom
cursor/smla-only-before-ubc-ctp-2c82

Conversation

@yjyang62

@yjyang62 yjyang62 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

Creates a build-friendly branch for CANN 9.1.T560 / A5 environments that need up-to-date sparse_flash_mla without pulling in mc2 operators that require COMM_PROTOCOL_UBC_CTP (e.g. engram_fetch, moe_ep_dispatch).

Branch strategy

  • Base: 24b77a54b ([flash_attn]整改torch extension目录) — last commit before COMM_PROTOCOL_UBC_CTP usage was introduced
  • Cherry-picked on top:
    • dcd6dbdd2 — BSND padding + FlashDecode workspace fix for SMLA
    • 2b68f554e — SMLA stride array pointer fix for non-contiguous KV

What this branch includes

  • Full sparse_flash_mla + sparse_flash_mla_metadata implementation
  • A5 arch35 kernel support (from base)
  • SMLA padding/workspace and stride fixes (cherry-picked)

What this branch excludes

  • engram_fetch / engram_fetch_wait
  • moe_ep_dispatch / moe_ep_combine
  • elastic_buffer COMM_PROTOCOL integration
  • Any other commits using COMM_PROTOCOL_UBC_CTP

Suggested build commands

git checkout cursor/smla-only-before-ubc-ctp-2c82
source /usr/local/Ascend/cann/set_env.sh

# SMLA-only custom package (recommended)
bash build.sh --pkg --soc=ascend950 \
  --vendor_name=custom \
  --ops=sparse_flash_mla,sparse_flash_mla_metadata -j8

# Or full ops-transformer package on this branch (no COMM_PROTOCOL ops)
bash build.sh --pkg --soc=ascend950 -j8

Conflict resolution note

Cherry-pick of 2b68f554e had doc/tiling conflicts; functional SMLA changes from that commit were kept.

Open in Web Open in Cursor 

cann-robot and others added 2 commits July 2, 2026 10:56
Co-authored-by: INeedAnID<panjie38@huawei.com>



# message auto-generated for no-merge-commit merge:
!7879 merge bsnd_padding into master

bsnd padding功能+fdworkspaceID计算修复

Created-by: INeedAnID
Commit-by: INeedAnID
Merged-by: cann-robot
Description: ## 描述
<!--在这里详细描述你的改动,包括改动的原因和所采取的方法。-->
bsnd padding功能+fdworkspaceID计算修复
## 关联的Issue
<!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000-->
<!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。-->

## 测试
<!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。-->

## 文档更新
<!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。-->

## 类型标签
<!--  [x] 表示选中 -->
- [x] 🐛 Bug修复
- [ ] ✨ 新特性
- [ ] ⚡ 性能优化
- [ ] ♻️ 重构
- [ ] 🧪 测试
- [ ] 📦 构建/CI
- [ ] 🔧 配置变更
- [ ] 📝 文档更新
- [ ] ⬆️ 依赖升级
- [ ] 🔒 安全修复
- [ ] 🧹 代码清理
- [ ] ❓ 其他,请描述:



See merge request: cann/ops-transformer!7879
Co-authored-by: weinachuan<weinachuan1@huawei.com>

!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 接口路径生效。

[#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant