Skip to content

[Docs] Update Agent Skills for CV fusion operators 🤖#966

Open
liggest wants to merge 3 commits intotile-ai:ascendc_ptofrom
liggest:example_dequant_gemm_w4a8_skills
Open

[Docs] Update Agent Skills for CV fusion operators 🤖#966
liggest wants to merge 3 commits intotile-ai:ascendc_ptofrom
liggest:example_dequant_gemm_w4a8_skills

Conversation

@liggest
Copy link
Copy Markdown
Contributor

@liggest liggest commented Apr 30, 2026

Summary

本次 PR 更新 Agent Skills 文档,增强 CV 融合算子开发支持,补充 workspace 索引一致性、V 核并行化等最佳实践。

Changes

新增文档

  • tilelang-op-generate/references/pr-ready-guide.md:上库前收尾工作完整指南(Golden 实现一致性检查、代码格式、注释转英文等)

tilelang-api-best-practices 更新

  • 新增 CV 融合算子快速导航条目
  • 新增 GEMM 分形限制文档(L0A/L0B/L0C 分形公式、dtype 对应的最小维度限制)
  • 新增 T.Parallel 在 Ascend 上的限制说明(支持的表达式类型、不支持的表达式及替代方案)
  • 新增 V 核并行化章节(按行切分、按任务切分、workspace 索引一致性)
  • 新增存储单元对齐要求和大小限制
  • 补充 UB 和 L1 不能直接搬运的说明
  • 补充 workspace 机制详细说明(数据流示例)
  • 修正 AUTO_CV_SYNC 配置名称

tilelang-expert-to-developer 更新

  • 新增 CV 融合算子场景配置表(Developer GEMM、Developer CV 融合、混合模式 CV 融合)
  • 新增示例代码位置表(含 CV 融合分类)
  • 新增 CV 融合 — Developer 模式完整示例(W4A8 GEMM)
  • 补充 AUTO_CV_COMBINE 与手写 Scope 冲突说明

tilelang-op-design 更新

  • 新增迁移算子必填字段(原算子路径、输出形状)
  • 新增 NPU 硬件约束检查清单(分形限制、对齐要求、存储大小上限)
  • 更新 CV 融合算子决策树(Developer 模式推荐配置)

tilelang-op-generate 更新

  • 新增 V 核并行化编码规范(按行切分、中间 buffer 索引一致性、CV 融合场景)
  • 新增 GEMM 编码规范(gemm_v0 初始化、分形限制)
  • 新增 CV 融合 pass_configs 配置示例
  • 新增上库前收尾检查清单(共 18 项)
  • 更新 troubleshooting(Golden 实现不一致排查)

.gitignore 更新

  • 新增 .arts/.agents/reports

Testing

文档变更,无需运行测试。相关示例代码已在 examples/dequantize_gemm/ 中验证通过。

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run bash format.sh in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work!

🚀

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly expands the TileLang-Ascend documentation, introducing best practices for CV fusion operators, matrix fractal limits, and workspace memory management. It also adds a comprehensive guide for PR readiness and troubleshooting. Review feedback pointed out a variable name inconsistency in a code example and a typo in the hardware error description.

@liggest
Copy link
Copy Markdown
Contributor Author

liggest commented Apr 30, 2026

/re-test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Task Failed

Summary: No summary available

Workflow run: View details

@liggest
Copy link
Copy Markdown
Contributor Author

liggest commented Apr 30, 2026

/re-test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Task Failed

Summary: No summary available

Workflow run: View details

@liggest
Copy link
Copy Markdown
Contributor Author

liggest commented May 1, 2026

/re-test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Task Completed successfully

Summary: Total: 118 | Passed: 118 | Failed: 0 (Pass rate: 100%)

Workflow run: View details

@lwwangcgz
Copy link
Copy Markdown
Contributor

/re-test

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Task Failed

Summary: No summary available

Workflow run: View details

@liggest liggest force-pushed the example_dequant_gemm_w4a8_skills branch from c3f1fe5 to 969d0a6 Compare May 7, 2026 08:39
- ✅ **1D 并行**:`for j in T.Parallel(N)`
- ✅ **2D 并行**:`for i, j in T.Parallel(M, N)`
- ✅ **serial + parallel 组合**:`for i in range(M): for j in T.Parallel(N)`
- ❌ **3D 或更高维并行**:不支持,会触发编译错误
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support the 3D double buffer scenario. Actually, the computation is still performed only on 2D tiles; the highest dimension merely indicates which stream to operate on. Such as https://github.com/tile-ai/tilelang-ascend/blob/ascendc_pto/examples/elementwise/elementwise_add_pipeline.py#L71

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the "3D 或更高维并行" in the document means for i, j, k ... in T.Parallel(M, N, K, ...).
It seems that the use case in elementwise_add_pipeline.py#L71 still fits the "2D 并行" case.
Perhaps the description is OK here I think 🤔

@liggest liggest force-pushed the example_dequant_gemm_w4a8_skills branch from 969d0a6 to 085f1c7 Compare May 8, 2026 02:23
@liggest liggest requested a review from ChaoyangJi May 8, 2026 06:37
liggest added 3 commits May 9, 2026 10:44
- Add CV fusion operator development guidance
- Add V-core parallelization best practices
- Add workspace index consistency rules
- Add GEMM fractal limits documentation
- Add pr-ready-guide.md for pre-commit checklist
- Update .gitignore for opencode artifacts
@liggest liggest force-pushed the example_dequant_gemm_w4a8_skills branch from af275e5 to e9270b7 Compare May 9, 2026 02:47
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.

4 participants