| 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(codegen): Bind local buffers before skipping VIEW/RESHAPE ops Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6279 merge codegen_9.2 into 9.2.0 fix(codegen): Bind local buffers before skipping VIEW/RESHAPE ops Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: 问题背景: codegen对SKIP_OPCODE_FOR_CODEGEN中的op会直接continue,连GenAllocForLocalBuffer一并跳过。Mix拆leaf子图后,C,V共用同一memId的UB时,needAlloc被打在被skip的RESHAPE/VIEW输出上,codegen未bind;后续COPY_OUT读的是VIEW后的新tensor(未带needAlloc),导致codegen报SYMBOL_NOT_FOUND。 解决方案: 在 CodeGenCloudNPU::GenFuncBody / CodeGenLiteNPU::GenFuncBody 中,将 GenAllocForLocalBuffer(op, symbolMgr) 移到 SKIP_OPCODE_FOR_CODEGEN 判断之前: - skip op:仍不 GenOpCode,但会消费 in/out 上的 needAlloc 完成 bind(同一 AllocKey 二次调用 reuse,安全) - 非 skip op:行为与原来一致 See merge request: cann/pypto!6279 | 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 | |
refactor(pypto-pro): Normalize integer scalar source types | 2 months ago | |
fix(machine): Split runtime headers and use secure bundle functions Co-authored-by: W4termy<wangmingyang21@huawei.com> # message auto-generated for no-merge-commit merge: !6422 merge fix/9.2.0_cleancode into 9.2.0 fix(machine): Split runtime headers and use secure bundle functions Created-by: W4termy Commit-by: W4termy Merged-by: cann-robot Description: cleancode 超大头文件、不安全函数修改 See merge request: cann/pypto!6422 | 2 months ago | |
fix(pass): Fall back UB2L1 to DDR when L1 copy-in uses MX_PADDING_MODE [9.2.0] Co-authored-by: li_qingyan<liqingyan10@h-partners.com> # message auto-generated for no-merge-commit merge: !6409 merge feature/ub2l1-mx-padding-ddr-fallback-9.2.0 into 9.2.0 fix(pass): Fall back UB2L1 to DDR when L1 copy-in uses MX_PADDING_MODE [9.2.0] Created-by: li_qingyan Commit-by: li_qingyan Merged-by: cann-robot Description: > 同步自 master 分支 MR #6401(基线 upstream/9.2.0,涉及文件两分支无差异)。 ## 问题 MatmulMX 构图在 A/B 的 L1 拷入 view 上设置 op_attr_copy_in_l1_padding_mode=MX_PADDING_MODE。MX 补齐(内外轴补零到 tileshape)仅由经 DDR 的拷入路径(TLoad/TLoadFillPad)执行;输入来自向量算子(如 cast)时,AssignMemoryType/ConvertInserter 会选择 UB->L1 直连(TCopyUB2L1),该路径不执行补齐。**validK 非 concrete(如 viewK 动态 K)或非 64 对齐时,L1 尾部数据未清零、MX matmul 计算结果错误**;validK 为 concrete 且 64 对齐时无需 K 向补齐,直连安全。 ## 方案 MXMatmul 场景 validK 非 concrete 或非 64 对齐不支持 UB2L1 直连,回退经 DDR 搬运(UB→DDR→L1,由 TLoad 执行 MX 补齐);concrete 且 64 对齐时保持直连。 1. memory_path_utils.h/.cpp:新增共享判断 IsMxPaddingMode(op) / HasMxPaddingModeConsumer(tensor),按 copy_in_l1_k_index 取拷入源 tensor 的 dynValidShape(validK)判定; 2. assign_memory_type.cpp(新路径)/ assign_memory_type_legacy.cpp(legacy):直连判定、小搬大、大搬小、LiteNPU reshape 共 9 个 UB2L1 决策点接入; 3. convert_op_inserter.cpp / convert_op_inserter_legacy.cpp:ProcessConvertPath UB->L1 分支兜底插入 DDR。 ## 校验 1. UT(新/旧路径各两例):cast(FP32->FP8E4M3) 喂入 MatmulMX,K=1 断言无 UB->L1 直连且存在 DDR->L1 中转,K=64 断言保持直连(不加约束时均失败); 2. ST:cast 喂入 scaled_mm,SMU01(K=128)走 UB2L1 直通、SMU02(K=96)回退 DDR,与 CPU golden 比对; See merge request: cann/pypto!6409 | 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 |