| Files | Last commit | Last update |
|---|---|---|
diag等算子冗余workspace改为分配0 Co-authored-by: xufeng12121<1074805447@qq.com> # message auto-generated for no-merge-commit merge: !6418 merge new_ww into master diag等算子冗余workspace改为分配0 Created-by: xufeng12121 Commit-by: xufeng12121 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> diag等算子冗余workspace改为分配0 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-math/issues/3678 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码整改 See merge request: cann/ops-math!6418 | 1 month ago | |
feat: diag算子适配Ascend960,arg_max/arg_min_with_value图模式支持Ascend960DT Co-authored-by: jzj007<jiangzhijie9@huawei.com> # message auto-generated for no-merge-commit merge: !6467 merge diag into master feat: diag算子适配Ascend960,arg_max/arg_min_with_value图模式支持Ascend960DT Created-by: jzj007 Commit-by: jzj007 Merged-by: cann-robot Description: ## 描述 本 PR 为 ops-math 仓补充 Ascend960DT( ascend960dt,NpuArch dav_9201)平台的算子适配:为 Diag 算子使能 960DT,并修正 ArgMaxWithValue / ArgMinWithValue 在 960DT 上的图模式数据类型推导。 ### 改动原因 1. Diag 仅在 ascend950 / ascend350 上注册,scripts/kernel/binary_config/ascendc_config.json 中 Diag 的 compute_units 也只包含这两个平台,导致 Ascend960DT 上缺失该算子能力。 2. ArgMaxWithValue / ArgMinWithValue 的 InferDataType 需要按 NpuArch 白名单决定是否读取 indice_dtype 属性: - arg_max_with_value 的白名单原本只有 NpuArch::DAV_3510,ascend960dt 会落到默认 DT_INT32,忽略 indice_dtype; - arg_min_with_value 使用 short_soc_version == "Ascend950" 字符串比较,同样覆盖不到 ascend960dt; - 两个算子的 CMakeLists.txt 中 SUPPORT_COMPUTE_UNIT 此前已包含 ascend960dt,缺的正是图模式这层推导。 ### 改动方法 1. conversion/diag/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 追加 ascend960dt,对应 SUPPORT_TILING_DIR 使用 arch35,复用现有 tiling 与 kernel,不新增 arch 目录。 2. conversion/diag/op_host/diag_def.cpp:新增 AICore().AddConfig("ascend960dt", aicore_config)。 3. conversion/diag/op_host/config/ascend960dt/: - diag_binary.json:7 条 dtype 组合(float16 / float32 / double / bfloat16 / int32 / int64 / complex64),输入 shape 为动态 [-2],与 ascend950 配置一致; - diag_simplified_key.ini:[Diag] default=0。 4. scripts/kernel/binary_config/ascendc_config.json:Diag 的 compute_units 追加 ascend960dt(auto_sync 保持 true)。 5. math/arg_max_with_value/op_graph/arg_max_with_value_graph_infer.cpp:SUPPORTED_NPU_ARCH_LIST 追加 NpuArch::DAV_9201。 6. math/arg_min_with_value/op_graph/arg_min_with_value_graph_infer.cpp:实现对齐 arg_max_with_value,抽出 IsSupportedNpuArch(),按 NpuArch 值查白名单 {DAV_3510, DAV_9201};补充平台信息与 NpuArch 读取失败时的 OP_LOGW;移除 short_soc_version 字符串比较与内联判断。 ascend960dt 与 dav_9201 的对应关系来自 cmake/soc_arch_variables.cmake 的 ASCEND_ALL_COMPUTE_UNIT / SOC_TO_ARCH_VALUES。 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/3689 ## 测试 - [x] 对两处 InferDataType 改动执行 g++ -fsyntax-only -std=c++17 语法编译校验,无错误 - [ ] 二级冒烟 / 算子泛化:本次未执行,需在 Ascend960DT 环境验证 Diag 编译与执行,以及 ArgMaxWithValue / ArgMinWithValue 图模式下 indice_dtype=int64 的推导结果 > 说明:本次未改动 kernel 代码与 tiling 逻辑,Diag 直接复用 op_kernel/arch35 与 op_host/arch35。 ## 文档更新 本次未修改 docs/ 与算子文档。需注意 conversion/diag/README.md 的"产品支持情况"表尚未列出 Ascend960DT 系列,如需对外声明支持范围,建议同步补充该表。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6467 | 30 days ago | |
math仓整改NpuArch33个算子 Co-authored-by: xiapengcheng5<xiapengcheng5@huawei.com> # message auto-generated for no-merge-commit merge: !7406 merge master into master math仓整改NpuArch33个算子 Created-by: xiapengcheng5 Commit-by: xiapengcheng5 Merged-by: cann-robot Description: ## 描述 math仓33个算子进行NpuArch的普通适配,ascend950、ascend960pr和ascend960dt 相关的 SocVersion 表达改为 NpuArch(范围限定 ascend950/ascend350→dav_3510,ascend960pr→dav_9201,ascend960dt→dav_9202,其他平台保持原形态)。 ## 关联的Issue [#4789](https://gitcode.com/cann/ops-math/issues/4789) <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 obp,950,960冒烟均pass。 ## 文档更新 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:整改 See merge request: cann/ops-math!7406 | 4 days ago | |
infer rt1.0迁移至2.0 Co-authored-by: RoyHys<huangyuqian6@huawei.com> # message auto-generated for no-merge-commit merge: !7067 merge pr_6729_logi into master infer rt1.0迁移至2.0 Created-by: RoyHys Commit-by: RoyHys Merged-by: cann-robot Description: ## 描述 fix: infershape 迁移重构——1.0 迁移至 op_host 2.0 链路并移除 InferShapeRange 对 diag/fill/slice/strided_slice×3/arg×4/bias_add_grad/diag_part/dot 共 13 个算子的 infershape 完成 1.0(canndev op_proto)→ 2.0 (op_host IMPL_OP_INFERSHAPE)迁移重构: 1. InferShape 迁移:推导逻辑逐分支等价移植,未知秩/混合维/ rank 边界/负轴归一/const 双分支全覆盖;数据依赖输入声明 InputsDataDependency(fill.dims、ArgMaxV2.dimension 等)。 2. 不迁移 InferShapeRange:评估后确认无变长编译 Range 推导需求, GE 侧 InferShapeRangeWithDefaultValue 兜底已覆盖; strided_slice 系的 InferShapeAndRangeCore 因承担 shape 计算 保留(range 参数传 nullptr)。 3. InferDataType 落 op_graph:diag 补 SameAsInput 注册(修复 图编译 E19999) 4. StridedSliceParams::ranges 补 NSDMI 默认初始化。 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/4666 ## 测试 验证:ops-math UT 120 PASS(5 个 tiling 失败为宏屏蔽环境所致, 已对照基线确认与本次改动无关);GEIR 白盒全量 47/47 PASS (静态+动态,覆盖 -1/-2/负轴/const 双分支/dtype 全集)。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7067 | 10 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 30 days ago | ||
| 4 days ago | ||
| 10 days ago |