| Files | Last commit | Last update |
|---|---|---|
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
feat(dfx): Runtime memory overlap check Co-authored-by: duanhaotian<duanhaotian@huawei.com> # message auto-generated for no-merge-commit merge: !5107 merge duanhaotian7 into master feat(dfx): Runtime memory overlap check Created-by: duanhaotian Commit-by: duanhaotian Merged-by: cann-robot Description: dump运行时各个op的读写信息以及每个op的读写范围大小并dump运行时整体内存使用情况统计,基于相关dump数据和topo序,设计内存重叠检测脚本,检测是否存在 内存重叠 See merge request: cann/pypto!5107 | 3 months ago | |
feat(dfx): Add aicpu sched trace log Co-authored-by: duanhaotian<duanhaotian@huawei.com> Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !5247 merge dev-atrace-test into master feat(dfx): Add aicpu sched trace log Created-by: qq_52905393 Commit-by: qq_52905393;duanhaotian Merged-by: cann-robot Description: 增加调度、mix 相关的 trace 日志 以及 分析脚本, 脚本执行方式: 开启 verbose,日志级别设置为 debug,python tools/schema/runtime_trace_log_parser.py device_log_trace_dir。 脚本根据日志分析结束时: 1、ctrl 构建的 devtask 数量和执行完成的 devtask 数量,当前 devtask 最后已经完成和未完成的 coretask 2、coretask 的生命周期,显示生命周期不完整的 coretask 的状态(resolve、send、ack、finish)、发送的 core 3、生命周期不完整的 mix trap 的 type(1c1v、1c2v),aic/aiv0/aiv1 的 coreid、aic/aiv0/aiv1 的 taskid、aic/aiv0/aiv1 的 task 状态 4、所有 aicore 的 status 5、所有线程管理的 core 范围 规则校验,目前脚本对以下规则进行校验: 1、线程下发的 coreIdx 必须在自身管理的核范围内 -- 控核 2、threadIdx 唯一性校验: 所有线程的 threadIdx 不能有重复 -- 仲裁 3、 arbitrationNum 一致性校验: 所有线程的 arbitratedScheNum 必须相同 -- 冲裁 4、coreId 范围校验: 所有 coreId 应该在 0 - 108 之间 -- 控核 、mix 调度 5、CoreTask 重复事件校验: 同一 CoreTask 的 send/finish/ack/runtime resolve 不应重复出现 6、runReady/pendReady 计数不应超过管理的核总数、pendReady 计数应不小于 runReady 计数 -- mix 调度 脚本输出示例: PyPTO Trace 任务生命周期报告 ======================================================================================== 日志目录 : /tmp/opencode/device-0-test Trace 文件数 : 1 Trace 事件数 : 307 执行结果 : 异常 构建 DeviceTask: 1 执行 DeviceTask: 1 首批 CoreTask : 40 入队 CoreTask : 0 异常 CoreTask : 40 输入文件 ---------------------------------------------------------------------------------------- /tmp/opencode/device-0-test/device-460800_20260803095140132.log 1. Launch Round ---------------------------------------------------------------------------------------- Round 1: Ctrl : start=1, end=1 Sche : start=3, end=3, tid=[1, 2, 3] 2. 握手统计 ---------------------------------------------------------------------------------------- 握手成功数: AIC=20, AIV=40 Round 1 仲裁控核范围: Scheduler 0: AIC=[0, 7) count=7, AIV=[20, 34) count=14 Scheduler 1: AIC=[7, 14) count=7, AIV=[34, 47) count=13 Scheduler 2: AIC=[14, 20) count=6, AIV=[47, 60) count=13 3. DeviceTask 与 CoreTask 生命周期 ---------------------------------------------------------------------------------------- Round 1 / DeviceTask 0: 异常 时间 : 2026-08-03 09:51:35.817435 -> 2026-08-03 09:51:45.842981 (10025.546 ms) 调度线程 : start=[0, 1, 2], end=[] DevTask CoreTask 计数 : finished=40 / expected=96 首批 CoreTask: unique=40, sent=40, finished=0 入队 CoreTask: unique=0, sent=0, ack=0, finished=0, abnormal=40 MIX CoreTask : unique=0, sent=0, finished=0 控核统计 : AIC=20, AIV=40, total=60 Scheduler 0: AIC=[0, 7) count=7, AIV=[20, 34) count=14, ctrlCoreDisabled=0 Scheduler 1: AIC=[7, 14) count=7, AIV=[34, 47) count=13, ctrlCoreDisabled=0 Scheduler 2: AIC=[14, 20) count=6, AIV=[47, 60) count=13, ctrlCoreDisabled=0 DeviceTask 异常: CoreTask 未全部执行结束: 40/96(异常结束) 4. 异常 CoreTask ---------------------------------------------------------------------------------------- Round 1 / DeviceTask 0: CoreTask 65538 (0x10002) : leafHash=0xB64F50759AF7B258 resolve=✓ send=✓ ack=- finish=✗ Scheduler: [0] Core: ['AIV[26]'] 异常: 缺少 finish CoreTask 65539 (0x10003) : leafHash=0xB64F50759AF7B258 resolve=✓ send=✓ ack=- finish=✗ Scheduler: [0] Core: ['AIV[27]'] 异常: 缺少 finish CoreTask 65540 (0x10004) : leafHash=0xB64F50759AF7B258 resolve=✓ send=✓ ack=- finish=✗ Scheduler: [0] Core: ['AIV[28]'] 异常: 缺少 finish CoreTask 65541 (0x10005) : leafHash=0xB64F50759AF7B258 resolve=✓ send=✓ ack=- finish=✗ Scheduler: [0] Core: ['AIV[29]'] 异常: 缺少 finish 5. MIX wrap 统计 ---------------------------------------------------------------------------------------- 日志中未找到 mix 任务 trace 6. 异常时 AICore 快照 ---------------------------------------------------------------------------------------- AIC[0]: running=4294967295, pending=65601, stage=0(UNKNOWN), stageTask=-, lastword=0, finishedReg=2147549249 AIC[1]: running=4294967295, pending=65600, stage=0(UNKNOWN), stageTask=-, lastword=0, finishedReg=2147549248 AIC[2]: running=4294967295, pending=65599, stage=0(UNKNOWN), stageTask=-, lastword=0, finishedReg=2147549247 AIC[3]: running=4294967295, pending=65598, stage=0(UNKNOWN), stageTask=-, lastword=0, finishedReg=2147549246 AIC[4]: running=4294967295, pending=65597, stage=0(UNKNOWN), stageTask=-, lastword=0, finishedReg=2147549245 结论 ---------------------------------------------------------------------------------------- - Round 1 返回错误 ret=107020 - DeviceTask round=1 taskId=0: CoreTask 未全部执行结束: 40/96(异常结束) - DeviceTask round=1 taskId=0: 40 个异常 CoreTask 异常总结: 构建/执行 DeviceTask: 1/1 异常 DeviceTask: 第 1 个 (round=1, taskId=0), CoreTask 总数=96, 未完成=40 Core Status: Scheduler 0: Idle Core: AIC=0, AIV=4 Pending Core: AIC=7, AIV=10 Running Core: AIC=0, AIV=0 Scheduler 1: Idle Core: AIC=0, AIV=13 Pending Core: AIC=7, AIV=0 Running Core: AIC=0, AIV=0 Scheduler 2: Idle Core: AIC=0, AIV=3 Pending Core: AIC=6, AIV=10 Running Core: AIC=0, AIV=0 Scheduler 0: AIC QUE SIZE: 0, AIV QUE SIZE: 0, MIX QUE SIZE: 0, 未下发task=0 CoreTask 生命周期不完整: 40 总结: 无任务可下发,有空闲核且有核在执行中 规则校验 ---------------------------------------------------------------------------------------- [✓] 调度核范围校验: 线程下发的 coreIdx 必须在自身仲裁管理的核范围内 — 通过 [✓] threadIdx 唯一性校验: 所有线程的 threadIdx 不能有重复 — 通过 [✓] arbitrationNum 一致性校验: 所有线程的 arbitratedScheNum 必须相同 — 通过 [✓] coreId 范围校验: 所有 coreId 应该在 0 - 108 之间 — 通过 [✓] CoreTask 重复事件校验: 同一 CoreTask 的 send/finish/ack/runtime resolve 不应重复出现 — 通过 [✓] Run/PendReadyCnt 计数校验 1: runReady/pendReady 计数不应超过管理的核总数 — 通过 [✓] Run/PendReadyCnt 计数校验 2: pendReady 计数应不小于 runReady 计数 — 通过 [✓] 核任务运行态一致性校验: runningId/pendingId 应与 send 记录匹配,且两者不能同时为非 INIT — 通过 See merge request: cann/pypto!5247 | 3 months ago | |
feat(dfx): AICERR supports offline loading of binary Co-authored-by: meiqing2<meiqing2@hisilicon.com> # message auto-generated for no-merge-commit merge: !5274 merge aic2 into master feat(dfx): AICERR supports offline loading of binary Created-by: meiqing2 Commit-by: meiqing2 Merged-by: cann-robot Description: 1. CompileAICoreKernel增加 enableSubFunc入参,控制编译NoSubFuncKernel 2. exception dump增加BundledKernel、NoSubFuncBundledKernel 3. debug_aicore_error.py 支持离线加载二进制做单算子复现 4. 增加资料说明 See merge request: cann/pypto!5274 | 3 months ago | |
fix(Interpreter):Add interface to tile_fwk_adapter Co-authored-by: dingbo929<dingbo24@h-partners.com> # message auto-generated for no-merge-commit merge: !5390 merge master into master fix(Interpreter):Add interface to tile_fwk_adapter Created-by: dingbo929 Commit-by: dingbo929 Merged-by: cann-robot Description: 1. 上板dump用到的接口封装到adapter层 See merge request: cann/pypto!5390 | 3 months ago | |
refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago | |
fix(security): Enforce TLS verification and add sha256/md5 integrity checks Co-authored-by: wangzheng97<wangzheng97@hisilicon.com> # message auto-generated for no-merge-commit merge: !4475 merge cann-pr/issue-1377-download-integrity into master fix(security): Enforce TLS verification and add sha256/md5 integrity checks Created-by: wangzheng97 Commit-by: wangzheng97 Merged-by: cann-robot Description: 修复 issue #1377(下载阶段禁用 TLS 证书校验,CWE-295)。 ## 改动(tools/prepare_env.sh) 移除 CANN 与第三方下载路径上的 --no-check-certificate(wget)与 --insecure(curl),恢复服务器证书校验。被下载并执行的安装包的完整性/真实性由经校验的 TLS 连接保证——网络中间人无法伪造 ascend-repo.obs / gitcode 的合法证书来替换安装包,这正是本 issue 描述的威胁。 ## 范围说明 tools/prepare_env.sh 是开发者本机环境引导脚本。针对该场景,恢复 TLS 校验即覆盖 issue 所述的网络 MITM 篡改威胁;未引入 pinned-hash / 签名等更重的完整性机制——其版本耦合与维护成本对一个 dev 引导脚本不成比例。 ## 验证 - bash -n 通过;仓库内已无 --no-check-certificate / --insecure 残留 - 证书正常的环境下下载不受影响(已实测 OBS/gitcode 证书校验通过、可正常下载) See merge request: cann/pypto!4475 | 4 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 4 months ago | ||
| 4 months ago |