| Files | Last commit | Last update |
|---|---|---|
add kirin9030 ops Co-authored-by: zengjuan<zengjuan2@huawei.com> # message auto-generated for no-merge-commit merge: !963 merge master into master add kirin9030 ops Created-by: zengjuan Commit-by: zengjuan Merged-by: cann-robot Description: ## 描述 add kirin9030 ops: conversion/circular_pad conversion/diag_flat conversion/diag_v2 conversion/feeds_repeat conversion/fill_diagonal_v2 conversion/masked_select_v3 conversion/stack_ball_query conversion/strided_slice_assign_v2 conversion/transpose_v2 math/angle_v2 math/is_finite math/is_inf math/lin_space math/mul_addn math/non_finite_check math/pows math/segsum math/transform_bias_rescale_qkv ## 关联的Issue https://gitcode.com/cann/ops-math/issues/602 ## 测试 蓝区门禁、黄区门禁、算子二级冒烟 ## 文档更新 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!963 | 9 months ago | |
fix: FeedsRepeat 修复功能、精度与资料问题 Co-authored-by: xuxiao59<xuxiao59@huawei.com> # message auto-generated for no-merge-commit merge: !6754 merge fix/feeds_repeat into master fix: FeedsRepeat 修复功能、精度与资料问题 Created-by: gcw_xYUkRrAH Commit-by: xuxiao59 Merged-by: cann-robot Description: ## 描述 修复 FeedsRepeat 算子经全量验证(Ascend950PR,静态检查 + 用例生成 + 上板执行)发现的功能、精度与资料问题,共 13 个文件、5 类缺陷根因: **Kernel 侧(op_kernel/feeds_repeat.h)** - 为 Sum/InitOutput 的 PopStackBuffer 预留 UB 栈空间(8KB),防止 TPipe 占满 UB 后 PopStackBuffer 断言失败(设备表现为 VEC_ERROR / NO_OUTPUT / 静默错误数值) - 负 feeds_repeat_times 钳 0、Repeat 循环按剩余输出截断( write_times = min(repeat_times, row_remain)),消除 sum(repeats) > output_feeds_size 时的块内越界写 - ClearOutputSpace 清零起点 end_index 钳制到 [0, empty_size],消除负数经 uint32 回绕导致的块外越界写 - 循环计数器 int 转 int64_t,防大 shape 溢出 **Tiling 侧(op_host/feeds_repeat_tiling.cpp)** - feeds 秩校验前移至 GetDim(0) 之前(rank-0 不再越界读) - feeds_repeat_times 容量上限按平台 UB 动态计算(含 8KB 栈预留),A2/A3 约 92KB、950 约 120KB - 空 tensor(dim0<1 / batch_num<=0)明确拒绝 - feeds_repeat_times 逐维溢出保护(累乘前检查 INT64_MAX) - output_feeds_size 负值拒绝 **InferShape 侧(op_host/feeds_repeat_infershape.cpp)** - 必选属性 output_feeds_size 判空与取值域校验前移至未知 Rank 早退之前 - 逐维判定 feeds_repeat_times 元素总数未知性(含偶数个 -1 维时 GetShapeSize 返回正积的边界),未知时跳过计数校验、由执行阶段 tiling 完成 **Proto(op_graph/feeds_repeat_proto.h)** - feeds/y dtype 从 TensorType::BasicType() 收紧为 {FP16, FP32, BF16}(与 def.cpp/InferDataType 同口径) **样例(examples/test_geir_feeds_repeat.cpp)** - 修复宏内 "placeholder" + int 指针偏移 bug(实际生成 "laceholder1" 而非 "placeholder1") - 输入缓冲 new[] 后补 delete[](Tensor 构造拷贝数据后即释放) - 输出按 dtype 打印而非逐字节 uint8 - 提前返回路径补 GEFinalize() - WriteDataToFile 增加fwrite 结果检查 **测试资产** - golden.py 入仓 tests/assets/(双键注册 feeds_repeat/FeedsRepeat、截断语义、mix_tolerance、多维展平、设备跟随) - UT 扩容:tiling 15 例(含秩 0/溢出/UB 贴界拒绝)、infershape 8 例(含 [-2] 传播/负属性/动态维)、kernel 若干 - gen_data.py 重写(原版 import tensorflow 且 argv 传参有误无法运行);删除不可运行的 gen_tiling.py **README** - UB 容量口径由固定 48KB/64KB 改为按平台动态推导(A2/A3 约 92KB、950 约 120KB) - 动态 shape 与 -1/-2 语义、output_feeds_size 取值域、空 tensor 约束声明 - feeds_repeat_times 元素总数定义与秩不限说明 ## 关联的Issue - https://gitcode.com/wangyueting/changwei_liuyi/issues/119 (GOLDEN_FAILURE:golden 语义不一致) - https://gitcode.com/wangyueting/changwei_liuyi/issues/121 (EE9999:UB 占满致设备崩溃) - https://gitcode.com/wangyueting/changwei_liuyi/issues/122 (E90003:容量门误拒合法输入 + 空 tensor 未声明) - https://gitcode.com/wangyueting/changwei_liuyi/issues/176 (ClearOutputSpace 清零长度负数 uint32 回绕越界写) - https://gitcode.com/wangyueting/changwei_liuyi/issues/177 (Repeat 循环未按剩余输出截断覆写) ## 测试 - Host UT:23/23 PASSED(tiling 15 + infershape 8,含新增秩 0/溢出/UB 贴界/[-2]/负属性/动态维守卫用例) - Kernel 路由:全量 571 例 + 34 条原失败复测全 PASS(三模式 dyn/cst/bin 100% 精度) - GEIR 路由:全量四模式(source/binary × const/dynamic)各 58 例全 PASS - 确定性路由:56 例 × 10 次重复全部 deterministic PASS - 异常路由:21 条 L2 负例中 15 条受控拒绝(拒绝消息含具体参数值)、6 条契约未建立 - ST 自验证:56 条 L0 输入检查 + 1 条真机 smoke PASS(100.0%) - 构建验证:ascend950/ascend910b kernel + ophost 全部编译通过 - 静态检查:87 项检查 0 发现(含 canndev 兼容基线对比 PASS) ## 文档更新 - README.md:UB 容量口径、动态 shape 语义、output_feeds_size 取值域、空 tensor 约束 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6754 | 12 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 9 months ago | ||
| 12 days ago |