可用于神经网络计算架构中实现可靠性、可用性和可维护性能力,提供安全、加密及维测相关算子,是CANN算子库的重要组成部分,源码跟随CANN版本发布,支持定制开发与调试调优。【此简介由AI生成】
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
工程修复json.cmake + 增加commit模板 Co-authored-by: yue-ma<mayue54@huawei.com> # message auto-generated for no-merge-commit merge: !5 merge master into master 工程修复json.cmake + 增加commit模板 Created-by: yue-ma Commit-by: yue-ma Merged-by: cann-robot Description: 工程修复json.cmake + 增加commit模板 See merge request: cann/ops-ras!5 | 7 个月前 | |
add new operator matmul_abft_verify Co-authored-by: kanboyi<2036465770@qq.com> # message auto-generated for no-merge-commit merge: !94 merge add_matmul_abft_verify into master add new operator matmul_abft_verify Created-by: starfican Commit-by: kanboyi Merged-by: cann-robot Description: ## 变更摘要 本次 PR 新增 MatmulFt 矩阵乘法外挂容错算子,代码位于 reliability/matmul_abft_verify。 该算子面向输出精度为 FLOAT32 的矩阵乘法算子。调用方提供输入矩阵 A、B 以及待检测的矩阵乘法结果 C,MatmulAbftVerify 基于方差估计 自适应门限算法(V-ABFT),对 C 执行分块 checksum 校验,以检测并定位矩阵乘法过程中产生的静默计算错误。 算子支持 BFLOAT16 和 FLOAT32 两种输入精度,支持 Atlas A2/A3 系列产品,并配套提供算子定义、shape/dtype 推导、 host tiling、kernel 实现、aclnn 接口文档以及 BF16 调用样例。 ## 主要改动 ### 新增 MatmulAbftVerify 外挂容错算子 - 接口功能:实现基于方差估计自适应门限算法(V-ABFT)的GEMM容错检测算子。算子接收矩阵A、B以及预先计算的矩阵乘结果C,对C进行分块ABFT校验,检测静默计算错误并输出逐行检测结果。 - 特点 - 自适应阈值: 该算子能够根据矩阵大小与值域自动确定用于比对的阈值,能够在保证检出率的同时避免误检。 - 自适应阈值算法与推导见https://gitee.com/yihenggao/v-abft的文档 - 计算量显著小于基于重新计算的容错方案。在矩阵维度m=n=k=a时,本算子只需8a^2次浮点计算,而重算则需要2a^3次浮点计算。且容错阈值也与该算法相匹配 - 计算公式: $$ C = A \times B, \quad A \in \mathbb{R}^{M \times K},\; B \in \mathbb{R}^{K \times N} $$ $$ C^r = C\times r, B^r=B\times r $$ 其中阈值$Threshold_i$由输入矩阵A、B的局部统计特征(均值、标准差)动态估计,无需依赖C矩阵输出结果。 - 算子功能说明: - 输入矩阵A、B和预先计算的C经过checksum编码、阈值估计和校验比对流程,输出压缩后的逐行故障检测结果张量 comp_row,1表示正确,0表示检测到错误。 ### 函数原型 每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnMatmulAbftVerifyGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnMatmulAbftVerify”接口执行计算。 cpp aclnnStatus aclnnMatmulAbftVerifyGetWorkspaceSize( const aclTensor *a, const aclTensor *b, const aclTensor *c, const aclTensor *checksumWeight, double EMAX, const aclTensor *compRow, uint64_t *workspaceSize, aclOpExecutor **executor); cpp aclnnStatus aclnnMatmulAbftVerify( void *workspace, uint64_t workspaceSize, aclOpExecutor *executor, aclrtStream stream); ### aclnnMatmulAbftVerifyGetWorkspaceSize - **参数说明:** <table style="undefined;table-layout: fixed;width: 1540px"><colgroup> <col style="width: 170px"> <col style="width: 120px"> <col style="width: 300px"> <col style="width: 330px"> <col style="width: 212px"> <col style="width: 100px"> <col style="width: 190px"> <col style="width: 118px"> </colgroup> <thead> <tr> <th>参数名</th> <th style="white-space: nowrap">输入/输出</th> <th>描述</th> <th>使用说明</th> <th>数据类型</th> <th><a href="../../../docs/zh/context/数据格式.md" target="_blank">数据格式</a></th> <th style="white-space: nowrap">维度(shape)</th> <th><a href="../../../docs/zh/context/非连续的Tensor.md" target="_blank">非连续的Tensor</a></th> </tr> </thead> <tbody> <tr> <td>a(aclTensor)</td> <td>输入</td> <td>矩阵乘法输入A。</td> <td> <ul> <li>维度为2,shape为[M, K]。</li> </ul> </td> <td>FLOAT16、BFLOAT16、FLOAT32</td> <td>ND</td> <td>[M, K]</td> <td>-</td> </tr> <tr> <td>b(aclTensor)</td> <td>输入</td> <td>矩阵乘法输入B。</td> <td> <ul> <li>维度为2,shape为[K, N]。</li> </ul> </td> <td>FLOAT16、BFLOAT16、FLOAT32</td> <td>ND</td> <td>[K, N]</td> <td>-</td> </tr> <tr> <td>c(aclTensor)</td> <td>输入</td> <td>预先计算的矩阵乘结果C = A × B,作为容错检测的数据输入。</td> <td> <ul> <li>维度为2,shape为[M, N]。</li> </ul> </td> <td>FLOAT32</td> <td>ND</td> <td>[M, N]</td> <td>-</td> </tr> <tr> <td>checksumWeight(aclTensor)</td> <td>输入</td> <td>列编码值向量,对应ABFT中的行校验和编码向量$r$(加权向量)。</td> <td> <ul> <li>维度为1,shape为[N]。</li> </ul> </td> <td>FLOAT16、BFLOAT16、FLOAT32</td> <td>ND</td> <td>[N]</td> <td>-</td> </tr> <tr> <td>EMAX(double)</td> <td>输入</td> <td>误差阈值系数,控制故障检测的灵敏度。</td> <td> <ul> <li>默认值为0.001。</li> <li>A,B为BF16精度,推荐值:0.001</li> <li>A,B为FP32精度, 推荐值: 0.00002</li> <li>使用小于推荐值的EMAX会增大检出率,但是也可能会出现误检情况。</li> <li>在出现误报的时候,可以将EMAX调大。</li> </ul> </td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> </tr> <tr> <td>compRow(aclTensor)</td> <td>输出</td> <td>压缩后的行方向故障检测位流输出。</td> <td> <ul> <li>每个bit表示一行一段的检测结果,1表示正确,0表示检测到错误。</li> </ul> </td> <td>UINT8</td> <td>ND</td> <td>[ceil(M/8) * splitN]</td> <td>-</td> </tr> <tr> <td>workspaceSize(uint64_t)</td> <td>输出</td> <td>返回需要在Device侧申请的workspace大小。</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> </tr> <tr> <td>executor(aclOpExecutor)</td> <td>输出</td> <td>返回op执行器,包含了算子计算流程。</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> <td>-</td> </tr> </tbody></table> 其中 $splitN = \lceil N / 256\rceil$。 ### 算子文档 新增 reliability/matmul_abft_verify/docs/MatmulAbftVerify.md ### BF16 调用样例 新增: reliability/matmul_abft_verify/examples/test_aclnn_matmul_abft_verify_bf16.cpp - ACL 运行环境初始化; - 输入、输出 Tensor 创建; - C 矩阵 Buffer 初始化; - workspace 查询与申请; - 算子调用; - 检测结果回拷和打印; - Device 资源释放。 由于前序矩阵乘法算子 aclnnGemm 暂时无法通过 ops-transformer 当前提供的脚本完成编译,仓库内样例仅展示 MatmulAbftVerify的调用方 式,没有在样例中串联实际的前序矩阵乘法,因此不构成完整的端到端容错演示。 包含前序矩阵乘法、多精度验证的完整样例可参考: https://gitee.com/kanby123/matmul_abft_verify ## 约束说明 - 确定性计算: - aclnnMatmulAbftVerify默认确定性实现。 - 输入矩阵a、b和c必须为2维,shape分别为[M, K]、[K, N]和[M, N],且a的第1维(K)与b的第0维(K)必须相等。 - 输入向量weight的shape必须为[N]。 - 支持的数据类型组合为: | a | b | c | checksumWeight | |:-------:|:-------:|:-------:|:-------:| | FLOAT16 | FLOAT16 | FLOAT32 | FLOAT16 | | BFLOAT16| BFLOAT16| FLOAT32 | BFLOAT16| | FLOAT32 | FLOAT32 | FLOAT32 | FLOAT32 | - 不支持的场景: - 不支持ND格式以外的数据格式。 - 不支持非连续的Tensor。 - 不支持a、b和c的维度不为2的场景。 ## Workspace使用设计 workspace由两部分组成: 1. 固定的16 MiB系统workspace。 2. user workspace,其中依次放置13个内部中间张量及FT内部临时区。 算子tiling阶段根据M、N、K和输入精度计算完整大小,并通过workspaceSize返回。调用者必须申请不少于该大小的连续device内存,不能只按compRow大小申请。所有中间张量的起始地址按32字节向上对齐。 定义: text splitN = ceil(N / 256) rowSplitLen = M * splitN bStatLen = ceil(splitN / 8) * 8 + 8 beLen = K * splitN align32(x) = ceil(x / 32) * 32 设W为user workspace首地址。在kernel内,W = AscendC::GetUserWorkspace(workspace);对于算子外部的device地址计算,当前实现等价于W = (uint8_t *)workspace + 16 MiB。 以下偏移均相对W。令S0 = 0,每个张量的起始偏移为Oi = align32(Si),结束位置为Si+1 = Oi + 元素数 × 元素字节数: | 顺序 | 中间结果 | 起始地址 | 元素类型 | 元素数 | |:--:|:--|:--|:--|--:| | 0 | z_row | W + O0 | FLOAT32 | rowSplitLen | | 1 | d_row | W + O1 | FLOAT32 | rowSplitLen | | 2 | threshold | W + O2 | FLOAT32 | rowSplitLen | | 3 | b_mean_abs | W + O3 | FLOAT32 | bStatLen | | 4 | b_mean_square | W + O4 | FLOAT32 | bStatLen | | 5 | b_var | W + O5 | FLOAT32 | bStatLen | | 6 | be | W + O6 | 与a相同 | beLen | | 7 | be_for_aiv | W + O7 | a为FLOAT16时是FLOAT16,否则是FLOAT32 | beLen | | 8 | b_max_slice | W + O8 | FLOAT32 | beLen | | 9 | b_min_slice | W + O9 | FLOAT32 | beLen | | 10 | a_max | W + O10 | FLOAT32 | M | | 11 | a_mean | W + O11 | FLOAT32 | M | | 12 | a_min | W + O12 | FLOAT32 | M | 其中FLOAT16和BFLOAT16元素占2字节,FLOAT32元素占4字节。第13段之后再次按32字节对齐,剩余区域是FT内部临时区,其逻辑大小为: text M * (splitN + 1) * sizeof(float) AMean计算使用的常量因子1/K不占用workspace。tiling阶段按输入精度生成该scalar,kernel在首次计算AMean时直接用它初始化FT的L1内部缓冲区,因此该因子不能作为workspace中间结果拷出。 如果需要调试并拷出某个中间结果,应在算子执行完成且workspace尚未释放或复用时,从上表对应的W + Oi开始执行device-to-host拷贝,拷贝字节数为“元素数 × 元素字节数”。对外读取workspace属于调试能力,不是稳定的公开输出接口;布局发生变更时,以[matmul_abft_verify.cpp](../op_kernel/matmul_abft_verify.cpp)中Workspace ABI注释下的地址切分代码为准,该代码也是偏移计算的示例实现。 ## 验证情况 ### 精度验证 - 算子编译及执行测试通过; - BF16 FP32 aclnn 接口调用测试通过; - 测试数据类型:BF16、FP32。 - 测试形状:矩阵乘形状按 (M, N, K) 表示,M/N/K 分别取 {1024, 2048, 4096, 8192},采用全组合覆盖,共 64 种形状/数据类 型,合计 128 个测试用例。 - 精度标杆:以 CPU 侧 Golden 计算结果为基准,校验 BMeanAbs、BMeanSquare、BVar、COMPRow、ZRow、BE/BEforAIV、DRow、 AMean、AMin、AMax 和 Thre 共 11 项中间结果及检测结果。阈值计算参数 e_max 为: - BF16:0.001 - FP32:0.00002 - 通过标准: - 所有输出元素必须为有限值; - 当累计计算量 computeNum < 2048 时,允许误差为 1/256 × max(1, |Golden|); - 当 computeNum ≥ 2048 时,允许误差为 1/128 × max(1, |Golden|); - COMPRow 要求与无错误标杆值 255 完全一致; - 任一校验项出现不满足条件的元素,该用例即判定失败。 - 测试结果:BF16 和 FP32 各 64/64 个形状全部执行成功;每个用例的 11 项 Golden 校验均为 PASSED,合计 128/128 个用例通 过,1408/1408 项校验通过,无失败项,通过率 100%。 结论:MatmulAbftVerify 算子在本次覆盖的 BF16、FP32 数据类型及全部 64 种矩阵形状下,精度测试全部通过。 - 完整的多精度测试见独立样例仓库。 ### FP32 C 错误注入实验 除无故障场景下的数值精度验证外,对待检测矩阵 \(C\) 进行了 bit-flip 错误注入,以验证算子对实际 SDC 的检测能力。 测试覆盖以下矩阵形状: text (M,K,N) = (2048,4096,4096) (2048,4096,8192) (4096,4096,4096) (4096,4096,8192) 并覆盖多种输入数据分布: text clamped_normal_0_1 normal_1_1 normal_1e-6_1 uniform_-1_1 对于 BF16 输入、FLOAT32 C 的实验,在 FP32 C 的 bit 27~29 注入错误时,四组矩阵 shape 的检出率基本保持稳定: * clamped_normal_0_1:约 **95.12%~95.27%** * normal_1_1:**100%** * normal_1e-6_1:约 **97.49%~97.60%** * uniform_-1_1:约 **92.51%~92.73%** 例如 \((M,K,N)=(4096,4096,8192)\) 时,bit 27~29 的检出率分别为约 95.20%、100%、97.60% 和 92.73%。 对于 FP32 输入,在测试的 bit 23~30 范围内,各数据分布的检出率整体保持在约 **90%~100%**。例如 \((4096,4096,4096)\) 时,bit 23~30 的检出率最低约为 90.04%,多项测试达到 100%。 与此同时,在上述错误注入测试对应的正常数据检测中,各测试 bit、矩阵 shape 和数据分布均未观察到误报,False-positive rate 为 **0%**。例如 FP32 \((4096,4096,8192)\) 的全部 bit 23~30 和四种数据分布误报率均为 0。 该结果说明,在当前错误注入覆盖范围内,自适应门限能够在保持零误报的同时,对会造成显著结果扰动的 bit-flip 错误维持较高检出率。 #### BF16 (M,K,N)=(2048,4096,4096) — Detection rate (%) | Bit | clamped_normal_0_1 | normal_1_1 | normal_1e-6_1 | uniform_-1_1 | |---:|---:|---:|---:|---:| | 23 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | | 24 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | | 25 | 7.360000 | 0.000000 | 0.000000 | 14.684000 | | 26 | 95.122000 | 0.000000 | 87.930000 | 92.506000 | | 27 | 95.122000 | 100.000000 | 97.531000 | 92.506000 | | 28 | 95.122000 | 100.000000 | 97.531000 | 92.506000 | | 29 | 95.122000 | 100.00 See merge request: cann/ops-ras!94 | 1 个月前 | |
refactor: 隔离 ops-ras 重复头文件路径 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !89 merge fix/remove-duplicate-headers into master refactor: 隔离 ops-ras 重复头文件路径 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 根据跨仓头文件扫描结果,处理重复头文件路径。 具体调整: - 清理 common/inc/framework/onnx_common.h、common/inc/op_api/level2_base.h 和 common/inc/op_api/op_api_def.h。 - 保留 aclnn_util.h 文件名及内容,将其从 common/inc/op_api 迁移到 common/include/external/ras;Git 识别为 R100。 - 保留 op_resource.h 文件名、宏和内容,将其从 common/inc/op_api 迁移到 common/include/static/ras;Git 识别为 R100。 - 使用 external/static 分类方式,并增加 ras 路径命名空间。 - 在 OPAPI_INCLUDE 中增加新的 RAS 隔离目录。 - 删除 classify_rule.yaml 中已不存在的 level2_base.h 交付项。 ## 关联的Issue 关联 Issue [#25](https://gitcode.com/cann/ops-ras/issues/25) ## 测试 UT 以及安装卸载通过 ## 文档更新 无。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:工程清理与头文件路径隔离 See merge request: cann/ops-ras!89 | 1 个月前 | |
docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !107 merge docs/install-guide-usability into master docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 完善本仓文档易用性(中英文版本同步修改): - **QUICKSTART.md / QUICKSTART_en.md**:运行样例命令统一补充 --soc 参数,并说明其取值须与编译算子包时一致,否则可能报 error 161001(如 aclnnXxxGetWorkspaceSize failed);章节开头整合多场景编译指引(单算子/整库/离线编译),链接《build参数说明》与《源码构建指南》。 - **docs/zh/install/compile.md / docs/en/install/compile.md**:新增 FAQ 章节,说明安装自定义 run 包报错权限不足的两种处理方式(推荐 --install-path 安装到用户可写路径并加载 set_env.bash;或使用 sudo -E 安装到系统 CANN 目录)。 - **CONTRIBUTING.md / CONTRIBUTING_en.md**:算子最小交付件树补充可选的子场景 Tiling 文件(${op_name}_tiling_${sub_case}.cpp/.h),增加指向项目目录结构文档的链接,并补充 _tiling 命名约束说明。 - **docs/zh/install/dir_structure.md / docs/en/install/dir_structure.md**:op_host 目录树补充 Tiling 交付件说明及 _tiling 命名约束。 根因说明:cmake/func.cmake 通过 file(GLOB ... *_tiling*.cpp) 收集 Tiling 源文件参与编译,不含 _tiling 的文件不会被 glob 命中,因而静默不编译,该约束此前未在文档中披露。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/36 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - docs/QUICKSTART.md - docs/zh/install/compile.md - CONTRIBUTING.md - docs/zh/install/dir_structure.md - docs/QUICKSTART_en.md - docs/en/install/compile.md - CONTRIBUTING_en.md - docs/en/install/dir_structure.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!107 | 1 个月前 | |
test: add_example kernel UT 补输入初始化与输出校验(修复 #27) Co-authored-by: Taoyouce<3463716443@qq.com> # message auto-generated for no-merge-commit merge: !91 merge fix/add-example-ut-verification into master test: add_example kernel UT 补输入初始化与输出校验(修复 #27) Created-by: 2403_87936996 Commit-by: Taoyouce Merged-by: cann-robot Description: ## Problem examples/add_example/tests/ut/op_kernel/test_add_example.cpp 的 test_case_0 零断言(EXPECT_*/ASSERT_* 数量为 0)且输入 x/y 分配后未初始化——ICPU_RUN_KF 之后直接释放内存,kernel 计算错误(甚至写出垃圾)也不会导致用例失败(对应 #27)。 ## Root cause 原实现只演示了 kernel 运行机制,缺少输入构造与结果校验。 ## Fix - ICPU_RUN_KF 前将 x/y 填入已知值:x[i]=i, y[i]=2i - 运行后逐元素校验 z[i] == x[i] + y[i](float32 加法位精确,位级比较;期望值 3i 在 fp32 下精确可表示) - 顺带将魔数 32*4*4*4 收敛为 totalLength 常量复用 ## Verification - 新增代码 gtest 片段本地语法编译通过 - 与同仓其余测试层对齐:test_add_example_tiling.cpp 校验 tiling 输出、fast_kernel_launch_example/tests/add/test_add.py 校验计算结果,本修复补齐 kernel UT 的校验缺口 - 不改动 kernel 与存量格式(仅新增行符合 clang-format) 仅改测试文件,不影响 kernel 行为。 See merge request: cann/ops-ras!91 | 1 个月前 | |
chore: normalize copyright year to 2026 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !66 merge split/pr10-copyright-2026 into master chore: normalize copyright year to 2026 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 Normalize Huawei-owned copyright and license header year expressions across the repository: - Replaced legacy years, year ranges, and dynamic year placeholders with the single year 2026. - Standardized 460 copyright licenses across 455 tracked files. - Updated the copyright header generation logic in scripts/package/package.py and scripts/util/ascendc_impl_build.py so newly generated files consistently use the single year 2026. - Preserved third-party copyright years, license text, documentation content, and unrelated code behavior. ## 关联的Issue Related to issue [#4](https://gitcode.com/cann/ops-ras/issues/4) ## 测试 ## 文档更新 No documentation content or structure was changed. Only Huawei copyright year expressions in tracked Markdown files were normalized. ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:Copyright/license year normalization See merge request: cann/ops-ras!66 | 3 个月前 | |
fix copyright and compilation bug Co-authored-by: kanboyi<2036465770@qq.com> # message auto-generated for no-merge-commit merge: !105 merge add_matmul_abft_verify_master into master fix copyright and compilation bug Created-by: starfican Commit-by: kanboyi Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修改了reliability/matmul_abft_verify/op_host/CMakeLists.txt以及reliability/matmul_abft_verify/CMakeLists.txt 在reliability/matmul_abft_verify/CMakeLists.txt中,更新了2026年的Copyright 在reliability/matmul_abft_verify/op_host/CMakeLists.txt中,替换显式链接为ops-ras仓内提供的高层级接口,同时令二进制配置json能够依据def.cpp自动生成 修复了在新版本的cann中编译出错的问题 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> 关联Issue [#35](https://gitcode.com/cann/ops-ras/issues/35) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 编译测试 通过 算子包正常生成 测试aclnn接口生成 通过 移除了旧的aclnn头文件等,观测到新的matmul_abft_verify的aclnn头文件生成 正确性测试 通过 运行了测试样例,与CPU运行结果比对,输出与CPU输出一致,中间结果与CPU运算中间结果误差在允许区间以内 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!105 | 1 个月前 | |
统一配置ops-ras安装目录及文件权限 Co-authored-by: q00889097<qinhan10@huawei.com> # message auto-generated for no-merge-commit merge: !93 merge master into master 统一配置ops-ras安装目录及文件权限 Created-by: qinhan123 Commit-by: q00889097 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 本 PR 主要统一了 ops-ras 安装流程中安装目录及文件的权限配置:移除散落在各脚本中的冗余 chmod/chown 操作,同时升级了 cann-cmake 第三方依赖版本, 规范权限统一的操作在cmake中实现。整体以减少冗余权限设置、统一权限基准为主,不涉及安装流程的业务逻辑改动。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/29 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [x] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!93 | 1 个月前 | |
add ascend350 config Co-authored-by: ASCEND222<dongfei16@h-partners.com> # message auto-generated for no-merge-commit merge: !92 merge master into master add ascend350 config Created-by: ASCEND222 Commit-by: ASCEND222 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> add ascend350 config ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/28 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!92 | 1 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
docs: add comprehensive English documentation set Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !76 merge docs/eng-ver into master docs: add comprehensive English documentation set Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 Add a comprehensive English documentation set for ops-ras: - Add root-level English project documentation, including the README, contribution guide, security statement, and changelog. - Add English entry points for the documentation center, quick start, and documentation contribution guidance. - Add English guides for installation, source builds, operator invocation, AI Core and AI CPU operator development, graph-mode adaptation, cross-platform migration, simulator usage, debugging, and performance tuning. - Add English references for operator concepts, data types, data formats, broadcasting, type conversion and promotion, quantization, sparsity, non-contiguous tensors, return codes, and two-stage APIs. - Add English operator and aclnn API lists. - Add the figures referenced by the new documentation. - Remove the placeholder docs/en/.gitignore now that the English documentation directory contains actual content. ## 关联的Issue [#8](https://gitcode.com/cann/ops-ras/issues/8) ## 测试 ## 文档更新 Added English project-level and detailed documentation covering the project overview, contribution process, security guidance, changelog, documentation navigation, quick start, installation, compilation, invocation, operator development, debugging, operator references, API references, basic concepts, quantization, sparsity, and supporting figures. ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!76 | 2 个月前 | |
feat(build): 支持 deb/rpm 及 all 格式安装包构建 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !98 merge feat/deb-rpm-packaging into master feat(build): 支持 deb/rpm 及 all 格式安装包构建 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 为内置 ops-ras 算子包增加 deb/rpm 打包入口,可通过 bash build.sh --pkg --pkg-type=deb|rpm|all 选择格式;默认仍为 run,all 一次生成 run、deb 和 rpm 三种格式。 - 将 PACKAGE_TYPE 传递给 cann-cmake 公共打包配置,在 Shell 和 CMake 层校验格式与构建模式;deb/rpm/all 仅支持内置、非静态算子包。 - 构建前清理所选格式的旧 deb/rpm 产物,构建成功后从构建根目录收集到 build_out/,忽略 CPack 暂存副本及其他仓库产物;构建失败或缺少预期格式时返回错误。 - 补充 RPM 元数据,并对不支持 PACKAGE_TYPE 的旧版离线 cann-cmake 缓存给出明确错误提示。 ## 关联的Issue 关联 Issue #32:https://gitcode.com/cann/ops-ras/issues/32 ## 测试 - 测试通过,覆盖默认/显式格式、非法参数组合、产物清理与收集、缺失产物以及打包失败路径。 - 提交说明记录已在 Ubuntu 22.04 aarch64 上验证 deb、rpm、all 和默认 run 构建;本次提交 PR 时复跑上述回归与静态检查,未重新执行完整构建或安装验证。 ## 文档更新 更新 docs/zh/install/build.md 和 docs/en/install/build.md,补充打包命令 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!98 | 1 个月前 | |
docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !107 merge docs/install-guide-usability into master docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 完善本仓文档易用性(中英文版本同步修改): - **QUICKSTART.md / QUICKSTART_en.md**:运行样例命令统一补充 --soc 参数,并说明其取值须与编译算子包时一致,否则可能报 error 161001(如 aclnnXxxGetWorkspaceSize failed);章节开头整合多场景编译指引(单算子/整库/离线编译),链接《build参数说明》与《源码构建指南》。 - **docs/zh/install/compile.md / docs/en/install/compile.md**:新增 FAQ 章节,说明安装自定义 run 包报错权限不足的两种处理方式(推荐 --install-path 安装到用户可写路径并加载 set_env.bash;或使用 sudo -E 安装到系统 CANN 目录)。 - **CONTRIBUTING.md / CONTRIBUTING_en.md**:算子最小交付件树补充可选的子场景 Tiling 文件(${op_name}_tiling_${sub_case}.cpp/.h),增加指向项目目录结构文档的链接,并补充 _tiling 命名约束说明。 - **docs/zh/install/dir_structure.md / docs/en/install/dir_structure.md**:op_host 目录树补充 Tiling 交付件说明及 _tiling 命名约束。 根因说明:cmake/func.cmake 通过 file(GLOB ... *_tiling*.cpp) 收集 Tiling 源文件参与编译,不含 _tiling 的文件不会被 glob 命中,因而静默不编译,该约束此前未在文档中披露。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/36 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - docs/QUICKSTART.md - docs/zh/install/compile.md - CONTRIBUTING.md - docs/zh/install/dir_structure.md - docs/QUICKSTART_en.md - docs/en/install/compile.md - CONTRIBUTING_en.md - docs/en/install/dir_structure.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!107 | 1 个月前 | |
docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !107 merge docs/install-guide-usability into master docs: 修复 QUICKSTART 易用性问题并补充构建 FAQ 与 _tiling 命名约束 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 完善本仓文档易用性(中英文版本同步修改): - **QUICKSTART.md / QUICKSTART_en.md**:运行样例命令统一补充 --soc 参数,并说明其取值须与编译算子包时一致,否则可能报 error 161001(如 aclnnXxxGetWorkspaceSize failed);章节开头整合多场景编译指引(单算子/整库/离线编译),链接《build参数说明》与《源码构建指南》。 - **docs/zh/install/compile.md / docs/en/install/compile.md**:新增 FAQ 章节,说明安装自定义 run 包报错权限不足的两种处理方式(推荐 --install-path 安装到用户可写路径并加载 set_env.bash;或使用 sudo -E 安装到系统 CANN 目录)。 - **CONTRIBUTING.md / CONTRIBUTING_en.md**:算子最小交付件树补充可选的子场景 Tiling 文件(${op_name}_tiling_${sub_case}.cpp/.h),增加指向项目目录结构文档的链接,并补充 _tiling 命名约束说明。 - **docs/zh/install/dir_structure.md / docs/en/install/dir_structure.md**:op_host 目录树补充 Tiling 交付件说明及 _tiling 命名约束。 根因说明:cmake/func.cmake 通过 file(GLOB ... *_tiling*.cpp) 收集 Tiling 源文件参与编译,不含 _tiling 的文件不会被 glob 命中,因而静默不编译,该约束此前未在文档中披露。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/36 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - docs/QUICKSTART.md - docs/zh/install/compile.md - CONTRIBUTING.md - docs/zh/install/dir_structure.md - docs/QUICKSTART_en.md - docs/en/install/compile.md - CONTRIBUTING_en.md - docs/en/install/dir_structure.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!107 | 1 个月前 | |
initial OPS-RAS | 8 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
docs: add batch consistency and determinism intro Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !100 merge docs/batch-consistency-determinism into master docs: add batch consistency and determinism intro Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 1. **Add feature introduction documents (Chinese and English)** - docs/zh/context/determinism_compute.md / docs/en/context/determinism_compute.md: introduce the background, notes, and usage of deterministic computation (for aclnn APIs, enable via aclrtSetSysParamOpt with ACL_OPT_DETERMINISTIC=1; for PyTorch APIs, enable via torch.use_deterministic_algorithms). - docs/zh/context/batch_consistency.md / docs/en/context/batch_consistency.md: introduce the background, notes (including version constraints: TorchNPU >= 26.2.0, CANN >= 9.2.0), and usage of Batch consistency (for aclnn APIs, enable via ACL_OPT_DETERMINISTIC=3; for PyTorch APIs, enable via torch_npu.npu.set_deterministic_level). 2. **Update the Basic Operator Concepts index**: add "Deterministic Computation" and "Batch Consistency" entries to docs/{zh,en}/context/basic_concept.md. 3. **Simplify the determinism note on the aclnn API list pages**: replace the long inline "determinism introduction" block in docs/{zh,en}/op_api_list.md with a [!NOTE] callout that directs readers to the Basic Operator Concepts page to learn about deterministic algorithms, Batch consistency, and common quantization modes. 4. **Add a badge row to the READMEs (Chinese and English)**: community operator list, project docs, license, contributing guide, and SIG badges. 5. **Update the English quick install guide**: replace the outdated WebIDE platform link (org/cann/discussions/54) with the [CANNLab guide](https://gitcode.com/cann/cann-learning-hub/blob/master/docs/CANNLab_env_experience_guide.md). ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to https://gitcode.com/cann/ops-ras/issues/33 https://gitcode.com/cann/ops-ras/issues/34 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Verified all added/modified Markdown internal links and relative paths; all resolve correctly. ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - Added: docs/zh/context/determinism_compute.md, docs/zh/context/batch_consistency.md, docs/en/context/determinism_compute.md, docs/en/context/batch_consistency.md - Modified: README.md, README_en.md, docs/zh/context/basic_concept.md, docs/en/context/basic_concept.md, docs/zh/op_api_list.md, docs/en/op_api_list.md, docs/en/install/quick_install.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!100 | 1 个月前 | |
docs: add batch consistency and determinism intro Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !100 merge docs/batch-consistency-determinism into master docs: add batch consistency and determinism intro Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 1. **Add feature introduction documents (Chinese and English)** - docs/zh/context/determinism_compute.md / docs/en/context/determinism_compute.md: introduce the background, notes, and usage of deterministic computation (for aclnn APIs, enable via aclrtSetSysParamOpt with ACL_OPT_DETERMINISTIC=1; for PyTorch APIs, enable via torch.use_deterministic_algorithms). - docs/zh/context/batch_consistency.md / docs/en/context/batch_consistency.md: introduce the background, notes (including version constraints: TorchNPU >= 26.2.0, CANN >= 9.2.0), and usage of Batch consistency (for aclnn APIs, enable via ACL_OPT_DETERMINISTIC=3; for PyTorch APIs, enable via torch_npu.npu.set_deterministic_level). 2. **Update the Basic Operator Concepts index**: add "Deterministic Computation" and "Batch Consistency" entries to docs/{zh,en}/context/basic_concept.md. 3. **Simplify the determinism note on the aclnn API list pages**: replace the long inline "determinism introduction" block in docs/{zh,en}/op_api_list.md with a [!NOTE] callout that directs readers to the Basic Operator Concepts page to learn about deterministic algorithms, Batch consistency, and common quantization modes. 4. **Add a badge row to the READMEs (Chinese and English)**: community operator list, project docs, license, contributing guide, and SIG badges. 5. **Update the English quick install guide**: replace the outdated WebIDE platform link (org/cann/discussions/54) with the [CANNLab guide](https://gitcode.com/cann/cann-learning-hub/blob/master/docs/CANNLab_env_experience_guide.md). ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to https://gitcode.com/cann/ops-ras/issues/33 https://gitcode.com/cann/ops-ras/issues/34 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Verified all added/modified Markdown internal links and relative paths; all resolve correctly. ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - Added: docs/zh/context/determinism_compute.md, docs/zh/context/batch_consistency.md, docs/en/context/determinism_compute.md, docs/en/context/batch_consistency.md - Modified: README.md, README_en.md, docs/zh/context/basic_concept.md, docs/en/context/basic_concept.md, docs/zh/op_api_list.md, docs/en/op_api_list.md, docs/en/install/quick_install.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!100 | 1 个月前 | |
Update repo metadata and compliance config and Remove conv3d_custom example code Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !56 merge repo-metadata-compliance into master chore: update repo metadata and compliance config Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> Update repo metadata and configs Remove Conv3DV2 example from repo ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> Related to [#3](https://gitcode.com/cann/ops-ras/issues/3) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: See merge request: cann/ops-ras!56 | 3 个月前 | |
docs: add comprehensive English documentation set Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !76 merge docs/eng-ver into master docs: add comprehensive English documentation set Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 Add a comprehensive English documentation set for ops-ras: - Add root-level English project documentation, including the README, contribution guide, security statement, and changelog. - Add English entry points for the documentation center, quick start, and documentation contribution guidance. - Add English guides for installation, source builds, operator invocation, AI Core and AI CPU operator development, graph-mode adaptation, cross-platform migration, simulator usage, debugging, and performance tuning. - Add English references for operator concepts, data types, data formats, broadcasting, type conversion and promotion, quantization, sparsity, non-contiguous tensors, return codes, and two-stage APIs. - Add English operator and aclnn API lists. - Add the figures referenced by the new documentation. - Remove the placeholder docs/en/.gitignore now that the English documentation directory contains actual content. ## 关联的Issue [#8](https://gitcode.com/cann/ops-ras/issues/8) ## 测试 ## 文档更新 Added English project-level and detailed documentation covering the project overview, contribution process, security guidance, changelog, documentation navigation, quick start, installation, compilation, invocation, operator development, debugging, operator references, API references, basic concepts, quantization, sparsity, and supporting figures. ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!76 | 2 个月前 | |
refactor(build): align build, test, and package pipelines with CANN 9.1.0 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !69 merge oat-correct into master refactor(build): align build, test, and package pipelines with CANN 9.1.0 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 本 PR 将 ops-ras 的依赖、构建、测试和安装基础设施对齐到 CANN 9.1.0,并清理了不属于 RAS 仓的 NN REG_OP 注册。 - CMake 与依赖:接入 cann-cmake 公共能力,统一管理 JSON、Abseil、Protobuf、Eigen、GoogleTest、OPBASE、mmpa 和可选 ops-test-kit;支持显式 CANN_3RD_LIB_PATH 与 ccache 开关;使用 version.cmake 生成 9.1.0 版本信息。 - 构建与 binary:更新构建入口、binary 配置/生成工具、Ascend350 映射、reliability 分类,以及 NPU architecture/Regbase 相关平台判断。 - 测试基础设施:增加 tiling、infershape、op_graph、op_kernel 和 AICPU 的公共 UT 执行与构建支撑。 - Graph/ES:删除 op_ras_proto_extend.h 内的 NN 模板注册;保留 --opgraph、proto 合并、Graph/ES 构建、Graph UT 和可选安装框架,并以实际代码 *_proto*.h 作为 source gate。当前默认源码无该输入,因此不生成或安装 ops_proto_ras.*、libopgraph_ras.so、libes_ras.so、ES 头或 wheel;显式 custom Graph source 仍可激活该框架。 - package/install:解压即安装,改用 cann-cmake 的公共 makeself/CPack/install 能力,统一 ops-ras 产品名与 ops_ras share-info 目录,删除仓内重复的 packer、latest-manager、makeself 和废弃安装辅助脚本;支持多路径 ASCEND_CUSTOM_OPP_PATH、RAS vendor fallback,以及 custom proto 对同包 ES 库的相对 RUNPATH。 ## 关联的Issue [#5](https://gitcode.com/cann/ops-ras/issues/5) ## 测试 - 构建:bash build.sh --pkg 通过;run 包 --check、--list、安装 fresh install、卸载 uninstall 无残留检查通过;默认包内无 graph 产物。 ## 文档更新 本 PR 未修改仓内产品文档;PR 与关联 Issue 的描述已按当前分支实现和实际验证边界更新。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他:CANN 9.1.0 工程基础设施迁移 See merge request: cann/ops-ras!69 | 2 个月前 | |
refactor(build): align build, test, and package pipelines with CANN 9.1.0 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !69 merge oat-correct into master refactor(build): align build, test, and package pipelines with CANN 9.1.0 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 本 PR 将 ops-ras 的依赖、构建、测试和安装基础设施对齐到 CANN 9.1.0,并清理了不属于 RAS 仓的 NN REG_OP 注册。 - CMake 与依赖:接入 cann-cmake 公共能力,统一管理 JSON、Abseil、Protobuf、Eigen、GoogleTest、OPBASE、mmpa 和可选 ops-test-kit;支持显式 CANN_3RD_LIB_PATH 与 ccache 开关;使用 version.cmake 生成 9.1.0 版本信息。 - 构建与 binary:更新构建入口、binary 配置/生成工具、Ascend350 映射、reliability 分类,以及 NPU architecture/Regbase 相关平台判断。 - 测试基础设施:增加 tiling、infershape、op_graph、op_kernel 和 AICPU 的公共 UT 执行与构建支撑。 - Graph/ES:删除 op_ras_proto_extend.h 内的 NN 模板注册;保留 --opgraph、proto 合并、Graph/ES 构建、Graph UT 和可选安装框架,并以实际代码 *_proto*.h 作为 source gate。当前默认源码无该输入,因此不生成或安装 ops_proto_ras.*、libopgraph_ras.so、libes_ras.so、ES 头或 wheel;显式 custom Graph source 仍可激活该框架。 - package/install:解压即安装,改用 cann-cmake 的公共 makeself/CPack/install 能力,统一 ops-ras 产品名与 ops_ras share-info 目录,删除仓内重复的 packer、latest-manager、makeself 和废弃安装辅助脚本;支持多路径 ASCEND_CUSTOM_OPP_PATH、RAS vendor fallback,以及 custom proto 对同包 ES 库的相对 RUNPATH。 ## 关联的Issue [#5](https://gitcode.com/cann/ops-ras/issues/5) ## 测试 - 构建:bash build.sh --pkg 通过;run 包 --check、--list、安装 fresh install、卸载 uninstall 无残留检查通过;默认包内无 graph 产物。 ## 文档更新 本 PR 未修改仓内产品文档;PR 与关联 Issue 的描述已按当前分支实现和实际验证边界更新。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他:CANN 9.1.0 工程基础设施迁移 See merge request: cann/ops-ras!69 | 2 个月前 | |
feat(build): 支持 deb/rpm 及 all 格式安装包构建 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !98 merge feat/deb-rpm-packaging into master feat(build): 支持 deb/rpm 及 all 格式安装包构建 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 为内置 ops-ras 算子包增加 deb/rpm 打包入口,可通过 bash build.sh --pkg --pkg-type=deb|rpm|all 选择格式;默认仍为 run,all 一次生成 run、deb 和 rpm 三种格式。 - 将 PACKAGE_TYPE 传递给 cann-cmake 公共打包配置,在 Shell 和 CMake 层校验格式与构建模式;deb/rpm/all 仅支持内置、非静态算子包。 - 构建前清理所选格式的旧 deb/rpm 产物,构建成功后从构建根目录收集到 build_out/,忽略 CPack 暂存副本及其他仓库产物;构建失败或缺少预期格式时返回错误。 - 补充 RPM 元数据,并对不支持 PACKAGE_TYPE 的旧版离线 cann-cmake 缓存给出明确错误提示。 ## 关联的Issue 关联 Issue #32:https://gitcode.com/cann/ops-ras/issues/32 ## 测试 - 测试通过,覆盖默认/显式格式、非法参数组合、产物清理与收集、缺失产物以及打包失败路径。 - 提交说明记录已在 Ubuntu 22.04 aarch64 上验证 deb、rpm、all 和默认 run 构建;本次提交 PR 时复跑上述回归与静态检查,未重新执行完整构建或安装验证。 ## 文档更新 更新 docs/zh/install/build.md 和 docs/en/install/build.md,补充打包命令 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!98 | 1 个月前 | |
refactor: 隔离 ops-ras 重复头文件路径 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !89 merge fix/remove-duplicate-headers into master refactor: 隔离 ops-ras 重复头文件路径 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 根据跨仓头文件扫描结果,处理重复头文件路径。 具体调整: - 清理 common/inc/framework/onnx_common.h、common/inc/op_api/level2_base.h 和 common/inc/op_api/op_api_def.h。 - 保留 aclnn_util.h 文件名及内容,将其从 common/inc/op_api 迁移到 common/include/external/ras;Git 识别为 R100。 - 保留 op_resource.h 文件名、宏和内容,将其从 common/inc/op_api 迁移到 common/include/static/ras;Git 识别为 R100。 - 使用 external/static 分类方式,并增加 ras 路径命名空间。 - 在 OPAPI_INCLUDE 中增加新的 RAS 隔离目录。 - 删除 classify_rule.yaml 中已不存在的 level2_base.h 交付项。 ## 关联的Issue 关联 Issue [#25](https://gitcode.com/cann/ops-ras/issues/25) ## 测试 UT 以及安装卸载通过 ## 文档更新 无。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:工程清理与头文件路径隔离 See merge request: cann/ops-ras!89 | 1 个月前 | |
refactor(build): align build, test, and package pipelines with CANN 9.1.0 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !69 merge oat-correct into master refactor(build): align build, test, and package pipelines with CANN 9.1.0 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 本 PR 将 ops-ras 的依赖、构建、测试和安装基础设施对齐到 CANN 9.1.0,并清理了不属于 RAS 仓的 NN REG_OP 注册。 - CMake 与依赖:接入 cann-cmake 公共能力,统一管理 JSON、Abseil、Protobuf、Eigen、GoogleTest、OPBASE、mmpa 和可选 ops-test-kit;支持显式 CANN_3RD_LIB_PATH 与 ccache 开关;使用 version.cmake 生成 9.1.0 版本信息。 - 构建与 binary:更新构建入口、binary 配置/生成工具、Ascend350 映射、reliability 分类,以及 NPU architecture/Regbase 相关平台判断。 - 测试基础设施:增加 tiling、infershape、op_graph、op_kernel 和 AICPU 的公共 UT 执行与构建支撑。 - Graph/ES:删除 op_ras_proto_extend.h 内的 NN 模板注册;保留 --opgraph、proto 合并、Graph/ES 构建、Graph UT 和可选安装框架,并以实际代码 *_proto*.h 作为 source gate。当前默认源码无该输入,因此不生成或安装 ops_proto_ras.*、libopgraph_ras.so、libes_ras.so、ES 头或 wheel;显式 custom Graph source 仍可激活该框架。 - package/install:解压即安装,改用 cann-cmake 的公共 makeself/CPack/install 能力,统一 ops-ras 产品名与 ops_ras share-info 目录,删除仓内重复的 packer、latest-manager、makeself 和废弃安装辅助脚本;支持多路径 ASCEND_CUSTOM_OPP_PATH、RAS vendor fallback,以及 custom proto 对同包 ES 库的相对 RUNPATH。 ## 关联的Issue [#5](https://gitcode.com/cann/ops-ras/issues/5) ## 测试 - 构建:bash build.sh --pkg 通过;run 包 --check、--list、安装 fresh install、卸载 uninstall 无残留检查通过;默认包内无 graph 产物。 ## 文档更新 本 PR 未修改仓内产品文档;PR 与关联 Issue 的描述已按当前分支实现和实际验证边界更新。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他:CANN 9.1.0 工程基础设施迁移 See merge request: cann/ops-ras!69 | 2 个月前 | |
refactor(build): align build, test, and package pipelines with CANN 9.1.0 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !69 merge oat-correct into master refactor(build): align build, test, and package pipelines with CANN 9.1.0 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 本 PR 将 ops-ras 的依赖、构建、测试和安装基础设施对齐到 CANN 9.1.0,并清理了不属于 RAS 仓的 NN REG_OP 注册。 - CMake 与依赖:接入 cann-cmake 公共能力,统一管理 JSON、Abseil、Protobuf、Eigen、GoogleTest、OPBASE、mmpa 和可选 ops-test-kit;支持显式 CANN_3RD_LIB_PATH 与 ccache 开关;使用 version.cmake 生成 9.1.0 版本信息。 - 构建与 binary:更新构建入口、binary 配置/生成工具、Ascend350 映射、reliability 分类,以及 NPU architecture/Regbase 相关平台判断。 - 测试基础设施:增加 tiling、infershape、op_graph、op_kernel 和 AICPU 的公共 UT 执行与构建支撑。 - Graph/ES:删除 op_ras_proto_extend.h 内的 NN 模板注册;保留 --opgraph、proto 合并、Graph/ES 构建、Graph UT 和可选安装框架,并以实际代码 *_proto*.h 作为 source gate。当前默认源码无该输入,因此不生成或安装 ops_proto_ras.*、libopgraph_ras.so、libes_ras.so、ES 头或 wheel;显式 custom Graph source 仍可激活该框架。 - package/install:解压即安装,改用 cann-cmake 的公共 makeself/CPack/install 能力,统一 ops-ras 产品名与 ops_ras share-info 目录,删除仓内重复的 packer、latest-manager、makeself 和废弃安装辅助脚本;支持多路径 ASCEND_CUSTOM_OPP_PATH、RAS vendor fallback,以及 custom proto 对同包 ES 库的相对 RUNPATH。 ## 关联的Issue [#5](https://gitcode.com/cann/ops-ras/issues/5) ## 测试 - 构建:bash build.sh --pkg 通过;run 包 --check、--list、安装 fresh install、卸载 uninstall 无残留检查通过;默认包内无 graph 产物。 ## 文档更新 本 PR 未修改仓内产品文档;PR 与关联 Issue 的描述已按当前分支实现和实际验证边界更新。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他:CANN 9.1.0 工程基础设施迁移 See merge request: cann/ops-ras!69 | 2 个月前 | |
chore(version): 升级 ops-ras 构建版本号到 9.2.0 Co-authored-by: LiuZonggu<liuzonggu1@huawei.com> # message auto-generated for no-merge-commit merge: !90 merge update-9.2.0 into master chore(version): 升级 ops-ras 构建版本号到 9.2.0 Created-by: LiuZonggu Commit-by: LiuZonggu Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 将 ops-ras 构建版本号从 9.1.0 升级到 9.2.0。 version.cmake:set_cann_package(ops-ras VERSION "9.1.0") → set_cann_package(ops-ras VERSION "9.2.0") ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-ras/issues/26 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - 构建验证:构建成功,产物 cann-910b-ops-ras_9.2.0_linux-aarch64.run - 安装验证:安装成功,version.info 与 ops_ras_version.h 版本均为 9.2.0,libopapi_ras.so 及 aclnn 头文件安装齐全 - 卸载验证:卸载成功,相关文件清除干净 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-ras!90 | 1 个月前 |
🔥Latest News
- [2026/07] ops-ras项目首次上线。
🚀概述
ops-ras是CANN(Compute Architecture for Neural Networks)算子库中的RAS算子库(Reliability, Availability and Serviceability),提供可靠性、可用性和可维护性等能力,包含安全、加密以及维测相关算子,"ras"即来源于这三项核心特性的首字母缩写。算子库架构图如下:

📌版本配套
本项目源码会跟随CANN软件版本发布,关于CANN软件版本与本项目标签的对应关系请参阅release仓库中的相应版本说明。 请注意,为确保您的源码定制开发顺利进行,请选择配套的CANN版本与Gitcode标签源码,使用master分支可能存在版本不匹配的风险。
🛠️环境准备
环境部署是体验本项目能力的前提,请先完成NPU驱动、CANN包安装等,确保环境正常。
⬇️源码下载
环境准备好后,下载与CANN版本配套的分支源码,通用命令如下,${tag_version}替换为分支标签名。以9.0.0分支源码下载为例:
# 通用命令:git clone -b ${tag_version} https://gitcode.com/cann/ops-ras.git
git clone -b 9.0.0 https://gitcode.com/cann/ops-ras.git
说明:若环境中已存在配套分支源码,可跳过本步骤,例如CANNLab默认已提供最新版CANN对应的源码。
📖学习教程
💬相关信息
PS:本项目功能和文档正在持续更新和完善中,欢迎您关注最新版本。