| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(dequant_swiglu_quant): 支持swiglu_mode=2/3及arch35动态非全载流水优化 Co-authored-by: caorenlei<caorenlei@huawei.com> # message auto-generated for no-merge-commit merge: !9386 merge dsq_new into master feat(dequant_swiglu_quant): 支持swiglu_mode=2/3及arch35动态非全载流水优化 Created-by: caorenlei Commit-by: caorenlei Merged-by: cann-robot Description: ## 描述 本PR对arch35(Ascend950)的dequant_swiglu_quant算子做两类改动: ### 1. swiglu_mode扩展至2/3 - host tiling属性校验由仅允许0/1放宽为0~3 - kernel侧将多个 swiGluMode == 0判定改为swiGluMode != 1(即mode 0/2/3共用前后半布局,mode 1走交织V2),并在fullload、notfull、static三条kernel路径中新增swiGluMode == 2/3分支 - mode 2:前后半切分 + clamp(x_glu, max=L) → x_glu·σ(α·x_glu),x_linear clamp(±L) + glu_bias - mode 3:前后半切分 + SiLU(α=1)后clamp(max=L),x_linear clamp(±L)无bias - 通过模板参数SwigluMode_在DequantSwigluV1、SwigluSingleYWithQuantScale、DequantAndSwiGlu中实现编译期分支 - 透传clamp_limit/glu_alpha/glu_bias至所有VF_CALL调用点 ### 2. 动态非全载流水优化 - **尾tile免GM中转**:尾tile在第一步内直接经CalculateResult + CopyOutY出y,省去该tile的xTemp落GM与读回 - **loopCount_==1短路**:整行在第一步完成,第二步及步间MTE3_MTE2同步全部省略 - **尾块均分**:循环次数不变前提下将尾轴均摊到各轮(按BLOCK_SIZE对齐),避免尾块仅占UB很小比例导致流水开销浪费 - **事件ID复用**:各类事件ID在循环外FetchEventID一次并复用,减少每loop标量开销 - **activation_scale复用**:按行只搬一次存入成员变量,整行loop间复用,第一步结束后释放 - 删除冗余显式MTE2_V barrier(由各输入TQue EnQue/DeQue承接同步) ### 3. 其他 - 修复dequant_swiglu_quant_dynamic_not_full_vf.h中Div<float, &DIV_MODE>为Div - 新增覆盖mode 0/1/2/3的ST golden脚本(golden.py)及ttk测试用例 ## 关联的Issue - #5295 ## 测试 - 使用ttk在Ascend950上对swiglu_mode 0/1/2/3进行全场景精度验证,结果与golden一致 - 编译ascend950二进制全部通过(72个.o文件) - 动态非全载场景性能验证达标 ## 文档更新 - 无 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [x] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!9386 | 25 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
fix(dequant_swiglu_quant): fix dynamic scale garbage when UbFactorDimy < 64 and Brcb overwriting scaleOut Co-authored-by: zhanglei<george.zhanglei@huawei.com> # message auto-generated for no-merge-commit merge: !9119 merge master into master fix(dequant_swiglu_quant): fix dynamic scale garbage when UbFactorDimy < 64 and Brcb overwriting scaleOut Created-by: east_yang Commit-by: zhanglei Merged-by: cann-robot Description: ## 描述 修复 dequant_swiglu_quant DSK 路径(groupIndexOptional + dynamic)两个精度 bug: 1. WholeReduceMax mask 写死 64:UbFactorDimy < 64(如 H=64)时第二阶段归约跨行读取并越界,行 max 读出 INT_MAX 级垃圾值。修复为 mask = min(UbFactorDimy, 64)。 2. Brcb 广播覆写 scaleOut:Brcb(outLocal, scaleOut, blockCount) 写 outLocal[0, blockCount*64) floats,与 scaleOut 所在偏移 UbSingleOutSize_/4 重叠(如 UbFactorDimx=1, outDimy=160 时 40 < 64),CopyOut 写出被破坏的 scale。修复为用单条 BroadCast 指令直连广播(与官方 dynamic_quant 一致),不再借道 outLocal。 ## 关联的Issue #5083(前置 #5063 已由 9176e2d85 合入) ## 测试 Atlas A2 (910b) ATK 精度验证: - x[15,64] 9 组(UbFactorDimy=32):Failed → Pass - x[1,320] 9 组(scaleOut 偏移 40 < 64):Failed → Pass - 回归 H=192 / 2560 / 6144 用例:Pass ## 文档更新 无 ## 类型标签 See merge request: cann/ops-nn!9119 | 29 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
fix(foreach_neg/dequant_swiglu_quant): 修复数组越界与动态量化除零缺陷 (#5019 #5020 #5011 #5012) Co-authored-by: east_yang<yangdong48@huawei.com> # message auto-generated for no-merge-commit merge: !9481 merge fix/issue-5019-5020-5011-5012 into master fix(foreach_neg/dequant_swiglu_quant): 修复数组越界与动态量化除零缺陷 (#5019 #5020 #5011 #5012) Created-by: east_yang Commit-by: east_yang Merged-by: cann-robot Description: ## 修复内容 本PR修复缺陷分析报告中的4个确认成立的缺陷: ### 1. foreach_neg host侧数组越界写 (#5019) foreach_neg_tiling.cpp 中 tensorNum 来自外部输入无上限校验, >256 时越界写 ForeachNegTilingData::tensorElements[256]。新增 MAX_TENSOR_NUM_FOREACH_NEG = 256 上限校验(对齐同仓 foreach_add_list 等算子写法)。 ### 2. foreach_neg kernel侧数组越界读 (#5020) foreach_neg_simt.h 中 tensorCount 未校验即作为循环上界读 GM。host侧修复后理论上不可达, 作为纵深防御在 kernel 侧 clamp 到 256。 ### 3. DequantSwigluQuant 动态量化除零 (#5011, #5012) 动态量化路径 DynamicCompute/BaseCompute2 中 scale = 1/value, 当某行 SwiGLU 输出全零(如 INT32量化输入为0、silu大负值饱和、padding token零填充行、MoE空路由行)时 value=0 → scale=inf → Muls 产生 0*inf=NaN, 量化输出被静默污染。增加零值防护: scale = (value == 0.0f) ? 1.0f : (1.0f / value)。 ## 验证 - ophost UT: 77/77 PASSED - ascend950 全量编译(ophost库+kernel binary): 0 error - host修复编入验证: .o 中含校验日志字符串 - kernel修复编入验证: md5对比实验确认clamp已编入 - pre-commit(OAT/clang-format/codespell等): 全部通过 Closes #5019 Closes #5020 Closes #5011 Closes #5012 See merge request: cann/ops-nn!9481 | 25 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
fix(foreach_neg/dequant_swiglu_quant): 修复数组越界与动态量化除零缺陷 (#5019 #5020 #5011 #5012) Co-authored-by: east_yang<yangdong48@huawei.com> # message auto-generated for no-merge-commit merge: !9481 merge fix/issue-5019-5020-5011-5012 into master fix(foreach_neg/dequant_swiglu_quant): 修复数组越界与动态量化除零缺陷 (#5019 #5020 #5011 #5012) Created-by: east_yang Commit-by: east_yang Merged-by: cann-robot Description: ## 修复内容 本PR修复缺陷分析报告中的4个确认成立的缺陷: ### 1. foreach_neg host侧数组越界写 (#5019) foreach_neg_tiling.cpp 中 tensorNum 来自外部输入无上限校验, >256 时越界写 ForeachNegTilingData::tensorElements[256]。新增 MAX_TENSOR_NUM_FOREACH_NEG = 256 上限校验(对齐同仓 foreach_add_list 等算子写法)。 ### 2. foreach_neg kernel侧数组越界读 (#5020) foreach_neg_simt.h 中 tensorCount 未校验即作为循环上界读 GM。host侧修复后理论上不可达, 作为纵深防御在 kernel 侧 clamp 到 256。 ### 3. DequantSwigluQuant 动态量化除零 (#5011, #5012) 动态量化路径 DynamicCompute/BaseCompute2 中 scale = 1/value, 当某行 SwiGLU 输出全零(如 INT32量化输入为0、silu大负值饱和、padding token零填充行、MoE空路由行)时 value=0 → scale=inf → Muls 产生 0*inf=NaN, 量化输出被静默污染。增加零值防护: scale = (value == 0.0f) ? 1.0f : (1.0f / value)。 ## 验证 - ophost UT: 77/77 PASSED - ascend950 全量编译(ophost库+kernel binary): 0 error - host修复编入验证: .o 中含校验日志字符串 - kernel修复编入验证: md5对比实验确认clamp已编入 - pre-commit(OAT/clang-format/codespell等): 全部通过 Closes #5019 Closes #5020 Closes #5011 Closes #5012 See merge request: cann/ops-nn!9481 | 25 天前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 25 天前 | ||
| 2 个月前 | ||
| 29 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 25 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 25 天前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 |