| Files | Last commit | Last update |
|---|---|---|
feat(machine): Support ASCEND_RT_LAUNCH_BLOCKING for AICPU scheduling blocking Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5823 merge br_blocking into master feat(machine): Support ASCEND_RT_LAUNCH_BLOCKING for AICPU scheduling blocking Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: ## 修改意图 支持通过环境变量 ASCEND_RT_LAUNCH_BLOCKING=1 控制 AICPU 调度流阻塞下发,用于调试和时序问题排查场景。 ## 修改内容 ### 1. Adapter 层新增 API 加载 - AclRtNoBlockingLaunchBegin/End:从 libruntime.so 加载 aclrtNoBlockingLaunchBeginImpl/EndImpl(libascendcl.so 未导出这两个符号,实际实现位于 libruntime.so) - AclRtSetStreamAttribute:从 libascendcl.so 加载 aclrtSetStreamAttribute ### 2. 运行时阻塞控制 - common.h 新增 IsLaunchBlockingEnabled(),读取 ASCEND_RT_LAUNCH_BLOCKING 环境变量(static 缓存) - device_launcher.cpp 中 LaunchKernel:当 !IsCaptureMode() && IsLaunchBlockingEnabled() 时,用 AclRtNoBlockingLaunchBegin/End 包裹 sche stream 上的 AICPU 调度下发 ### 3. ST 测试用例 - 新增 test_blocking_launch.py,通过 spawn 子进程在 import torch 前继承环境变量验证功能 ## 改动文件 | 文件 | 说明 | |------|------| | framework/src/adapter/api/acl_api.cpp / acl_api.h | 新增 AclRtSetStreamAttribute、AclRtNoBlockingLaunchBegin/End 实现 | | framework/src/adapter/manager/types/acl_adapter_types.h | 新增 RtSetStreamAttribute 枚举与符号映射 | | framework/src/adapter/manager/types/runtime_adapter_types.h | 新增 NoBlockingLaunchBegin/End 枚举,映射到 aclrtNoBlockingLaunchBeginImpl/EndImpl | | framework/src/adapter/stubs/acl_stubs.cpp / acl_stubs.h | 新增 StubRtSetStreamAttribute stub | | framework/src/interface/utils/common.h | 新增 IsLaunchBlockingEnabled() | | framework/src/machine/runtime/launcher/device_launcher.cpp | LaunchKernel 中接入阻塞下发控制 | | python/tests/st/test_blocking_launch.py | 新增 ST 用例 | ## 验证 - 环境变量未设置时:行为不变(走原有 ring event / RunPreSync 同步) - ASCEND_RT_LAUNCH_BLOCKING=1 时:sche stream 非阻塞下发 - CANN 版本不兼容时(缺少符号)打印 warning 但不中断执行 Related Issue: #3188 See merge request: cann/pypto!5823 | 2 months ago | |
refactor(build): Reuse the common compilation options from common cmake. Co-authored-by: Feiteng Zheng<zhengfeiteng1@h-partners.com> # message auto-generated for no-merge-commit merge: !5292 merge 20260728-intf-pub-2 into master refactor(build): Reuse the common compilation options from common cmake. Created-by: zhengfeiteng Commit-by: Feiteng Zheng Merged-by: cann-robot Description: 切换使用 cann/cmake 仓规定的 intf_pub。 - 通过CANN_GLIBCXX_USE_CXX11_ABI属性设置tile_fwk_calculator的_GLIBCXX_USE_CXX11_ABI Related Issue: #2650 See merge request: cann/pypto!5292 | 3 months ago | |
fix(operation): Bound FillPad padding to tile columns Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !6513 merge fix-fillpad-9.2.0 into 9.2.0 fix(operation): Bound FillPad padding to tile columns Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: FillPad 对共享 UB 缓冲区中的列分块处理错误,导致有效数据被清零,并可能越过目标缓冲区边界。 concat 结果的形状为 [16,128],vector tile 配置为 [16,80],因此 FillPad 被拆分为前 80 列和后 48 列两个分块。两个分块保留父缓冲区的物理行步长 128。原 TFillPad 封装直接使用 layout 中的静态宽度 128 构造 PTO Tile。底层 TFILLPAD_EXPAND 会将输入有效列之外的区域补到该静态宽度,而不是限制在当前分块的 80/48 列范围内。 Related Issue: https://gitcode.com/cann/pypto/issues/3387 See merge request: cann/pypto!6513 | 2 months ago | |
fix(simulation): Register ERF pipe type and fallback unknown opcodes Co-authored-by: zhiweiyuan<zhiweiyuan@huawei.com> # message auto-generated for no-merge-commit merge: !6556 merge fix/sim-erf-pipe-type-9.2.0 into 9.2.0 fix(simulation): Register ERF pipe type and fallback unknown opcodes Created-by: zhiweiyuan Commit-by: zhiweiyuan Merged-by: cann-robot Description: fix(simulation): Register ERF pipe type and fallback unknown opcodes Cherry-pick of #6521 (master) into 9.2.0. Task-level simulation (--run_mode sim) aborts with F16766 INVALID_PIPE_TYPE when executing kernels containing the ERF opcode (e.g. GELU/GeGLU in activation.py). Root cause: SCHED_CORE_PIPE_TYPE lacks the ERF mapping, and TileOp::GetPipeType() hard-asserts on unknown opcodes with no fallback path. Changes: - Register {"ERF", CorePipeType::PIPE_VECTOR_ALU} in SCHED_CORE_PIPE_TYPE - Refactor TileOp::GetPipeType(): unknown opcodes now fall back to PIPE_VECTOR_ALU with a SIMULATION_LOGW warning instead of aborting; this also fixes the pre-existing UB where the LOOP exemption path dereferenced end() when LOOP was absent from the table Related Issues: #3392 See merge request: cann/pypto!6556 | 2 months ago | |
fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Include dump function attribute support for rebuildable attrs. Co-authored-by: Cursor <cursoragent@cursor.com> | 2 months ago | |
fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Include dump function attribute support for rebuildable attrs. Co-authored-by: Cursor <cursoragent@cursor.com> | 2 months ago | |
fix(pass): Fold common dynamic base of split views into reshape copy-in Co-authored-by: hwwangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !6571 merge fix/validshape-dynamic-offset-92-v2 into 9.2.0 fix(pass): Fold common dynamic base of split views into reshape copy-in Created-by: hwwangmingjun Commit-by: hwwangmingjun Merged-by: cann-robot Description: 修复动态 Reshape 场景下 View Offset 折叠错误导致的精度问题 ## 背景 在 ValidShape 动态场景中,动态非对齐 Reshape 会被替换为: RESHAPE_COPY_OUT -> workspace -> RESHAPE_COPY_IN -> 多个 View 当多个 View 由 Split 生成,并且同时包含动态起始地址和静态 tile 偏移时,原有逻辑无法正确识别共同动态基址,导致 RESHAPE_COPY_IN 使用错误的零偏移搬运数据,最终产生精度错误。 ## 问题根因 多个 View 的实际地址形式为: 共同动态基址 + 各自静态 tile 偏移 例如: dynamic_base + [ 0, 0] dynamic_base + [ 0, 32] dynamic_base + [16, 0] dynamic_base + [16, 32] 原逻辑直接比较各 View 的 offset,将: dynamic_base dynamic_base + 16 判定为不同地址,因此放弃 offset 折叠,使 RESHAPE_COPY_IN 保持: from offset = [0, 0] 在后续动态循环中,数据从错误的 GM 地址搬运,导致精度失败。 ## 修改内容 优化 RemoveUnalignedReshape 的 View Offset 折叠逻辑: - 识别多个 View 共享的动态基址; - 计算 View 覆盖的联合搬运区域; - 将动态基址下沉到 RESHAPE_COPY_IN; - 保留各 View 的局部静态 tile 偏移; - 同步更新 copy-in 的 shape 和动态 valid shape。 处理后: RESHAPE_COPY_IN offset = dynamic_base View offset: [ 0, 0] [ 0, 32] [16, 0] [16, 32] RESHAPE_COPY_IN 负责从正确的动态地址搬入完整数据块,各 View 负责选择对应的 tile。 ## 影响范围 该修改适用于以下通用模式: 多个 View 共享动态基址,同时具有不同的静态 tile 偏移 如果无法提取共同动态基址、动态末维 offset 不可表达,或联合区域越界,则保持原图,不执行折叠。 ## 测试验证 新增 UT 覆盖二维 tile View 的共同动态基址折叠场景: framework/tests/ut/passes/src/test_remove_unaligned_reshape_op.cpp 验证以下用例全部通过: 109、111、112、123、130、149、 152、163、165、173、180、183 其中 case 111 的 RESHAPE_COPY_IN 已从错误的零偏移改为使用动态行起始地址,精度恢复正常。 See merge request: cann/pypto!6571 | 2 months ago | |
feat(platform): Modify Platform config Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !6227 merge sfplatform into 9.2.0 feat(platform): Modify Platform config Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: 背景: 原始的platform信息并沿用了机器层面命名。 本 PR 对平台配置域做概念规范化,统一到三个标准概念: soc_series:原 short_soc_version(ini 键 Short_SoC_version),如 Ascend950; soc_version:芯片分 bin(ini 键 SoC_version,每个 soc_version 一个 ini 文件),如 Ascend950PR_9589; NPU_ARCH:核架构名称(ini 键 NpuArch),如 3510/2201。 A2/A3/A5 属于整机(chip + host CPU/网卡/机箱)层面的机器概念,不再用于平台配置选择。 Changes: platform_config 精简为实际交付的 13 个 soc_version ini(69 -> 13),规格与 CANN 9.2.0 包内文件一致;Ascend910_9363、Ascend950DT_9581X 按交付需求保留 DPlatform 枚举适配真实 soc_version,不再自定义枚举值:删除与实际芯片不符的 ASCEND_950DT_9579/ASCEND_950PR_9582(对应真实 bin 为 Ascend950DT_9572/Ascend950PR_9589), 补充 ASCEND_910_9363/ASCEND_950DT_9581X platform.h 新增 DPlatformToNPUArch(),统一 soc_version -> NPU_ARCH 映射 (910B 系列 -> 2201,950 系列 -> 3510,Kirin -> 3113/3003) GetCyclesForPass 仿真器选择改为按 NPU_ARCH 判断(3510 -> "A5",其余 -> "A2A3"), 不再按 A2A3/A5 机器名前缀匹配;A2A3/A5 仅作为 cost model 内部实现类型名保留 默认 device_platform 统一为标准格式 Ascend910B2(config_manager.h / tile_fwk_config.json) CMakeLists 安装清单与交付 ini 清单保持一致 UT 同步更新:枚举映射、legacy 格式兼容、NPU_ARCH 映射、ini 规格加载用例, 新增 Ascend910_9363 / Ascend950DT_9581X 用例 兼容性: 旧格式 device_platform(如 "ASCEND_910B2")仍可识别,自动归一化为标准 soc_version 并打印告警; 其中 ASCEND_950DT_9579 -> Ascend950DT_9572、ASCEND_950PR_9582 -> Ascend950PR_9589, 与其原先实际加载的 ini 规格保持一致 ASCEND_910C4 为无效值,回落默认 Ascend910B2(与原行为一致) Tests: TestDevicePlatformConfig(16 例)、TestConfigManager、CostModelTest 相关用例全部通过; See merge request: cann/pypto!6227 | 2 months ago | |
fix(machine): fix log quality issues in machine module. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5679 merge pyptolog_fix into master fix(machine): fix log quality issues in machine module. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: PyPTO machine 模块日志整改 See merge request: cann/pypto!5679 | 3 months ago | |
refactor(operator): Remove tile_fwk_operator library and associated tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5704 merge delete_test into master refactor(operator): Remove tile_fwk_operator library and associated tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 整改库上代码,删除 framework/src/operator python/tests/st/operator/glm python/tests/st/operator/test_page_attention.py 以及相关涉及文件 See merge request: cann/pypto!5704 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago |