| Files | Last commit | Last update |
|---|---|---|
修改表格的rowspan参数 Co-authored-by: fwx1169505<fengying27@h-partners.com> # message auto-generated for no-merge-commit merge: !14176 merge master into master 修改表格的rowspan参数 Created-by: fengying555682 Commit-by: fwx1169505 Merged-by: cann-robot Description: ## 描述 修改表格的rowspan参数 ## 关联的Issue [#8190](https://gitcode.com/cann/ops-nn/issues/8190) ## 测试 已经验证文档的语法和链接一致性 ## 文档更新 activation和quant目录下的文件 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!14176 | 10 days ago | |
fix: 修复Quantize示例outHostData初始化越界问题 Co-authored-by: cuijie25<cuijie24@h-partners.com> # message auto-generated for no-merge-commit merge: !11920 merge fix/quantize-examples into master fix: 修复Quantize示例outHostData初始化越界问题 Created-by: cuijie25 Commit-by: cuijie25 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修复 quant/quantize/examples/test_aclnn_quantize.cpp 中 outHostData 初始化导致的 host 侧越界读: - 原代码 std::vector<int32_t> outHostData = {8, 0}; 仅构造 2 个元素(8 字节),而 CreateAclTensor 按 outShape={4, 2} 申请并拷贝 32 字节(8 × int32),aclrtMemcpy 存在 host 侧越界读(未定义行为); - 修改为 std::vector<int32_t> outHostData(8, 0); 构造 8 个元素,消除越界读; - 同时将 docs/aclnnQuantize.md 调用示例代码块的 3 处折行(CreateAclTensor 签名、aclCreateTensor、aclrtMemcpy 调用)对齐 examples cpp 的 clang-format 风格; - 修改后示例代码与 docs/aclnnQuantize.md 调用示例保持**逐字符一致(含折行/缩进等全部格式,git 归一化行尾口径下 155 行 / 6058 字符完全相同)**;文档侧 outHostData 修复参考 !11418。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> [#6660](https://gitcode.com/cann/ops-nn/issues/6660) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - A2(Atlas 910B3,CANN 9.1.0 实卡):示例编译(g++ -Wall 无告警)运行成功,输出 out={2,10,3,10,5,10,2,10},与公式 round(x/scales)+zeroPoints 手算结果逐项一致(如 round(3.1024/1.0)+2=5、round(1.4621/-3.0)+10=10)。 - 一致性核验:aclnnQuantize.md 调用示例代码块与修改后 cpp 逐字符一致(含折行/缩进等全部格式)。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 更新 docs/aclnnQuantize.md 调用示例代码块的 3 处折行,与 examples cpp 的 clang-format 风格对齐(outHostData 修复内容文档侧已是正确写法,来自 !11418)。 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!11920 | 1 month ago | |
DynamicQuant等22个算子支持Ascend960dt Co-authored-by: TH_HW<taohai2@huawei.com> # message auto-generated for no-merge-commit merge: !11335 merge backBlue into master DynamicQuant等22个算子支持Ascend960dt Created-by: TH_HW Commit-by: TH_HW Merged-by: cann-robot Description: ## 描述 (+17812 / -2151)为一批 ops-nn 算子补齐 **Ascend 960DT(NPU Arch 9201)** 平台支持,并重构 GeGluV2 arch35 内核、为 Erfinv 增加 inplace 通路。 主要改动如下: 1. **Ascend960DT 平台适配(22 个算子)** - activation:Relu、ReluV2、ReluGrad、ReluGradV2、Sigmoid、SigmoidGrad、PRelu、PReluGradUpdate、SiluGrad、Softplus、Swish、SwishGrad、SwiGluGrad、GeGluV2。 - index:MapIndex、SparseSlice、QuantUpdateScatter。 - quant:Quantize、DynamicQuant、DynamicQuantV2、AntiMxQuant、GroupedDynamicMxQuant。 - 具体做法:CMakeLists.txt 的 SUPPORT_COMPUTE_UNIT / SUPPORT_TILING_DIR 增加 ascend960dt;*_def.cpp 增加 AddConfig("ascend960dt", ...);aclnn/op_api 与 infershape 增加 NpuArch::DAV_9201 / Ascend960DT 分支;kernel 增加 __NPU_ARCH__ == 9201 分支;新增 op_host/config/ascend960dt/ 下的算子二进制配置(共 22 个,如 relu_binary.json、p_relu.json 等);scripts/kernel/binary_config/ascendc_config.json 为相关算子登记 ascend960dt 计算单元与编译选项。 2. **GeGluV2 arch35 内核重构** - 将 arch35 模板按 erf / tanh 两类拆分,并补齐 align、align_last_axis_big、vreduce × fp16/bf16/fp32 变体,统一命名 *_arch35.h。 - tiling 新增 RegBase per-template per-element UB 预算模型(GetRegbasePerElem),并支持 ascend960dt。 - aclnnGeGlu 参数校验重构(CheckShape 支持 0D 输入与 dim 范围校验),新增 ST 用例(all_aclnnGeGlu(.V3).json)并调整 UT。 3. **Erfinv 支持 inplace**:新增 inplace dtype 支持列表与校验(GetInplaceDtypeSupportList / CheckInplaceDtypeValid),并补充 op_api UT。 4. **内核与接口修复** - SparseSlice:9201 路径改用 SetValue 写入 sliceStart/sliceEnd(替代 DataCopy),Reg::Reduce 使用完整命名空间限定。 - QuantUpdateScatter:9201 增加 FLOAT_OVERFLOW_MODE_CTRL 保护。 - ReluV2 infershape:Ascend960DT 不支持 NC1HWC0,UINT1 支持列表加入 Ascend960DT。 - DynamicQuant / Mx 量化:9201 上 fp8 scale 改为 bf16 乘法后再 cast 到 e8m0。 5. **代码规范**:统一 License 头注释格式、补齐文件末尾换行、调整 quant 系列 UT 的 CMakeLists;新增 MapIndex、SparseSlice 的 GE IR 图模式示例。 ## 关联的Issue 无。 ## 测试 - 新增 GeGluV2 ST 用例与 Erfinv inplace UT,补充/调整 GeGluV2 相关 UT。 - 新增 MapIndex / SparseSlice 的 GE IR 示例(examples/test_geir_*.cpp)。 - 通过 ascend960dt 编译与静态检查。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 新特性 - [ ] Bug修复 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!11335 | 1 month ago | |
feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14292 merge feat/dv122-ascend960pr-adaptation-p3 into master feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3 批(ST 隔离批,64 个算子)**。 (1/2)见 !14184(43 算子)、(2/2)见 !14185(76 算子)。三 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配。 ### 本批范围(64 个算子) **ST 执行失败算子 53 个**(详见 7_run_st_test.log 失败清单)+ **反向依赖闭包 11 个**(avg_pool_v2、embedding、glu、renorm、group_norm_grad、embedding_dense_grad、max_pool3d_with_argmax_v2、adaptive_max_pool3d、max_pool3d_grad_with_argmax、add_rms_norm_dynamic_quant_v2、ascend_quant_v2 —— 保证(1/2)(2/2)内无悬空依赖)。 含:activation(elu/gelu/leaky_relu/mish/relu/sigmoid/softplus/softmax 系)、pooling(adaptive_avg_pool/avg_pool/max_pool 系 16 个)、index(scatter/gather/embedding 系 15 个)、quant(ascend_quant/dynamic_quant/quantize 等)、loss(cross_entropy_loss/l1_loss_grad)、norm(batch_norm_grad_v3、add_rms_norm_dynamic_quant)、conv/foreach/hash/matmul 若干。 ### 定位与合入说明 - 本批算子 960pr ST(kernel/aclnn 用例)存在失败,已定位待修复,**独立成批以免阻塞(1/2)(2/2)合入** - 依赖(1/2)中的公共库(pool_3d_common/pool_grad_common/adaptive_pool3d_common 等)960pr 注册,**需在(1/2)(2/2)合入后再 merge 本 PR**,届时 rebase master 即可获取 - 拆分同时修复了此前遗漏的 ascendc_config.json 中 AvgPoolV2Grad/SegmentSum 重名条目位置的 960pr 变更(本批 52 个 json 条目,保持上游 715 行逐条目格式) ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ## 测试 - op_host UT 全量:10160 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败,与本 PR 无关) - pre-commit 全部通过(242 文件) - 宿主侧编译与 ST 以 CI 为准(本批 ST 失败即待修项) ## 文档更新 不涉及 See merge request: cann/ops-nn!14292 | 8 days ago | |
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 | 4 months ago | |
feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14292 merge feat/dv122-ascend960pr-adaptation-p3 into master feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3 批(ST 隔离批,64 个算子)**。 (1/2)见 !14184(43 算子)、(2/2)见 !14185(76 算子)。三 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配。 ### 本批范围(64 个算子) **ST 执行失败算子 53 个**(详见 7_run_st_test.log 失败清单)+ **反向依赖闭包 11 个**(avg_pool_v2、embedding、glu、renorm、group_norm_grad、embedding_dense_grad、max_pool3d_with_argmax_v2、adaptive_max_pool3d、max_pool3d_grad_with_argmax、add_rms_norm_dynamic_quant_v2、ascend_quant_v2 —— 保证(1/2)(2/2)内无悬空依赖)。 含:activation(elu/gelu/leaky_relu/mish/relu/sigmoid/softplus/softmax 系)、pooling(adaptive_avg_pool/avg_pool/max_pool 系 16 个)、index(scatter/gather/embedding 系 15 个)、quant(ascend_quant/dynamic_quant/quantize 等)、loss(cross_entropy_loss/l1_loss_grad)、norm(batch_norm_grad_v3、add_rms_norm_dynamic_quant)、conv/foreach/hash/matmul 若干。 ### 定位与合入说明 - 本批算子 960pr ST(kernel/aclnn 用例)存在失败,已定位待修复,**独立成批以免阻塞(1/2)(2/2)合入** - 依赖(1/2)中的公共库(pool_3d_common/pool_grad_common/adaptive_pool3d_common 等)960pr 注册,**需在(1/2)(2/2)合入后再 merge 本 PR**,届时 rebase master 即可获取 - 拆分同时修复了此前遗漏的 ascendc_config.json 中 AvgPoolV2Grad/SegmentSum 重名条目位置的 960pr 变更(本批 52 个 json 条目,保持上游 715 行逐条目格式) ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ## 测试 - op_host UT 全量:10160 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败,与本 PR 无关) - pre-commit 全部通过(242 文件) - 宿主侧编译与 ST 以 CI 为准(本批 ST 失败即待修项) ## 文档更新 不涉及 See merge request: cann/ops-nn!14292 | 8 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14292 merge feat/dv122-ascend960pr-adaptation-p3 into master feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3 批(ST 隔离批,64 个算子)**。 (1/2)见 !14184(43 算子)、(2/2)见 !14185(76 算子)。三 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配。 ### 本批范围(64 个算子) **ST 执行失败算子 53 个**(详见 7_run_st_test.log 失败清单)+ **反向依赖闭包 11 个**(avg_pool_v2、embedding、glu、renorm、group_norm_grad、embedding_dense_grad、max_pool3d_with_argmax_v2、adaptive_max_pool3d、max_pool3d_grad_with_argmax、add_rms_norm_dynamic_quant_v2、ascend_quant_v2 —— 保证(1/2)(2/2)内无悬空依赖)。 含:activation(elu/gelu/leaky_relu/mish/relu/sigmoid/softplus/softmax 系)、pooling(adaptive_avg_pool/avg_pool/max_pool 系 16 个)、index(scatter/gather/embedding 系 15 个)、quant(ascend_quant/dynamic_quant/quantize 等)、loss(cross_entropy_loss/l1_loss_grad)、norm(batch_norm_grad_v3、add_rms_norm_dynamic_quant)、conv/foreach/hash/matmul 若干。 ### 定位与合入说明 - 本批算子 960pr ST(kernel/aclnn 用例)存在失败,已定位待修复,**独立成批以免阻塞(1/2)(2/2)合入** - 依赖(1/2)中的公共库(pool_3d_common/pool_grad_common/adaptive_pool3d_common 等)960pr 注册,**需在(1/2)(2/2)合入后再 merge 本 PR**,届时 rebase master 即可获取 - 拆分同时修复了此前遗漏的 ascendc_config.json 中 AvgPoolV2Grad/SegmentSum 重名条目位置的 960pr 变更(本批 52 个 json 条目,保持上游 715 行逐条目格式) ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ## 测试 - op_host UT 全量:10160 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败,与本 PR 无关) - pre-commit 全部通过(242 文件) - 宿主侧编译与 ST 以 CI 为准(本批 ST 失败即待修项) ## 文档更新 不涉及 See merge request: cann/ops-nn!14292 | 8 days ago | |
test: 恢复被注释的UT断言与用例(Issue #7688责任田,13文件58处) Co-authored-by: ywx1080114<yuanbin22@huawei.com> # message auto-generated for no-merge-commit merge: !14375 merge fix-commented-assertions into master test: 恢复被注释的UT断言与用例(Issue #7688责任田,13文件58处) Created-by: yuanbin_22 Commit-by: ywx1080114 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 恢复 Issue #7688 责任田内被注释的 UT 断言与测试用例,共 13 个文件(+175 -166),恢复断言/校验 58 处: **恢复被注释的断言(12 个文件,49 处):** | 文件 | 恢复数 | |------|--------| | quant/dynamic_quant_v2/tests/ut/op_host/test_dynamic_quant_v2_tiling.cpp | 18 | | quant/ascend_quant_v2/tests/ut/op_api/test_aclnn_ascend_quant.cpp | 7 | | quant/ascend_anti_quant_v2/tests/ut/op_host/op_api/test_aclnn_ascend_anti_quant.cpp | 5 | | activation/ge_glu_grad_v2/tests/ut/op_host/op_api/test_aclnn_geglu_backward.cpp | 4 | | activation/sigmoid/tests/ut/op_host/arch35/test_sigmoid_tiling.cpp | 3 | | activation/silu_grad/tests/ut/op_api/test_aclnn_silu_backward.cpp | 3 | | activation/ge_glu_v2/tests/ut/op_host/test_aclnn_geglu.cpp | 2 | | activation/gelu_quant/tests/ut/op_host/test_gelu_quant_tiling.cpp | 2 | | quant/ascend_quant_v2/tests/ut/op_host/test_ascend_quant_v2_tiling.cpp | 2 | | activation/swish_grad/tests/ut/op_api/test_aclnn_swish_backward.cpp | 1 | | norm/deep_norm/tests/ut/op_host/test_DeepNorm_infershape.cpp | 1 | | quant/quantize/tests/ut/op_api/test_aclnn_quantize.cpp | 1 | **恢复被注释的整段测试用例:** - index/sparse_slice/tests/ut/op_host/test_sparse_slice_infershape.cpp(9 处):恢复整段被注释的 TEST_F 用例(含 InferShapeRange_success 等)。 **适配处理:** - test_sigmoid_tiling.cpp:原注释断言使用已废弃的 to_string<int64_t>(...) 接口,新增本地 TilingData2Str 辅助函数读取 tiling data,并按当前 tiling 行为修正期望值(如 15800 15480 → 15872 10944),断言恢复为 EXPECT_NE(TilingData2Str(tilingData).find(...), string::npos)。 **改动原因:** 历史整改中被注释的 UT 断言长期失去看护作用,按 Issue #7688 责任田清单批量恢复,重建 UT 对 tiling key、tiling data、输出 dtype/shape 等的校验能力。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> - 关联 Issue #7688(仅关联,合并后不自动关闭该 Issue) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - 恢复的 58 处断言随对应 UT 套件执行通过(tiling key、tiling data、infershape、aclnn 输出校验等)。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - 无需文档更新。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:测试(恢复被注释的UT断言) ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!14375 | 5 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14292 merge feat/dv122-ascend960pr-adaptation-p3 into master feat: vector算子适配ascend960pr(DV122)平台(4/4,ST隔离批) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3 批(ST 隔离批,64 个算子)**。 (1/2)见 !14184(43 算子)、(2/2)见 !14185(76 算子)。三 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配。 ### 本批范围(64 个算子) **ST 执行失败算子 53 个**(详见 7_run_st_test.log 失败清单)+ **反向依赖闭包 11 个**(avg_pool_v2、embedding、glu、renorm、group_norm_grad、embedding_dense_grad、max_pool3d_with_argmax_v2、adaptive_max_pool3d、max_pool3d_grad_with_argmax、add_rms_norm_dynamic_quant_v2、ascend_quant_v2 —— 保证(1/2)(2/2)内无悬空依赖)。 含:activation(elu/gelu/leaky_relu/mish/relu/sigmoid/softplus/softmax 系)、pooling(adaptive_avg_pool/avg_pool/max_pool 系 16 个)、index(scatter/gather/embedding 系 15 个)、quant(ascend_quant/dynamic_quant/quantize 等)、loss(cross_entropy_loss/l1_loss_grad)、norm(batch_norm_grad_v3、add_rms_norm_dynamic_quant)、conv/foreach/hash/matmul 若干。 ### 定位与合入说明 - 本批算子 960pr ST(kernel/aclnn 用例)存在失败,已定位待修复,**独立成批以免阻塞(1/2)(2/2)合入** - 依赖(1/2)中的公共库(pool_3d_common/pool_grad_common/adaptive_pool3d_common 等)960pr 注册,**需在(1/2)(2/2)合入后再 merge 本 PR**,届时 rebase master 即可获取 - 拆分同时修复了此前遗漏的 ascendc_config.json 中 AvgPoolV2Grad/SegmentSum 重名条目位置的 960pr 变更(本批 52 个 json 条目,保持上游 715 行逐条目格式) ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ## 测试 - op_host UT 全量:10160 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败,与本 PR 无关) - pre-commit 全部通过(242 文件) - 宿主侧编译与 ST 以 CI 为准(本批 ST 失败即待修项) ## 文档更新 不涉及 See merge request: cann/ops-nn!14292 | 8 days ago | |
删除源码链接 Co-authored-by: fwx1169505<fengying27@h-partners.com> # message auto-generated for no-merge-commit merge: !12106 merge master into master 删除源码链接 Created-by: fengying555682 Commit-by: fwx1169505 Merged-by: cann-robot Description: ## 描述 删除源码链接 ## 关联的Issue [#6769](https://gitcode.com/cann/ops-nn/issues/6769) ## 测试 仅涉及文档修改,已经测试md文档语法 ## 文档更新 activation和quant目录下的md文档 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!12106 | 1 month ago | |
docs: add English translations for operator READMEs and repo docs Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13351 merge docs/add-english-docs into master docs: add English translations for operator READMEs and repo docs Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## Description Add English translations for 652 markdown documents: - Repo-level guides: README_en.md, CONTRIBUTING_en.md, SECURITY_en.md, CHANGELOG_en.md, codearts_check_rule_config_en.md - Operator READMEs under activation/, conv/, control/, foreach/, hash/, index/, loss/, matmul/, norm/, optim/, pooling/, quant/, rnn/, vfusion/, etc. - API and design docs under docs/ (aclnn_*, ascendir_*, fusion pass docs) - examples/ and torch_extension/ guides Note: a few cross-reference links whose English targets are not published yet temporarily point to their Chinese counterparts to keep links valid; they will be switched back to the English docs in a follow-up PR after this one is merged. ## Related Issue N/A ## Test - Verified all 1,344 intra-repo markdown links in the added files resolve against master: 0 broken links, 0 missing targets. ## Documentation Update - This PR only adds English documentation files (*_en.md); no existing Chinese documents are modified. ## Type Labels - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [x] Documentation update - [ ] Other, please describe: ## AI/Agent-Generated Declaration - [x] AI-assisted authoring See merge request: cann/ops-nn!13351 | 17 days ago |
Quantize
English | 简体中文
Applicable Products
| Product | Support |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | × |
| Atlas inference products | √ |
| Atlas training products | √ |
Function
-
Operator function: Performs quantization processing on the input tensor x.
-
Formula:
out=round((x/scales)+zeroPoints)out=round((x/scales)+zeroPoints) out=round((x/scales)+zeroPoints)
Parameters
| Parameter name | Input/Output/Attribute | Description | Data type | Data format |
|---|---|---|---|---|
| x | Input | x in the formula | FLOAT, FLOAT16, BFLOAT16 | ND |
| scales | Input | scales in the formula | FLOAT, BFLOAT16 | ND |
| zero_points | Input | zeroPoints in the formula | FLOAT, INT32, INT8, UINT8, BFLOAT16 | - |
| y | Output | Output tensor out in the formula | INT8, UINT8, INT32, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN | ND |
Invocation Description
| Invocation method | Sample code | Description |
|---|---|---|
| aclnn API | test_aclnn_quantize.cpp | Invoke the operator through the aclnnQuantize.md API. |