| Files | Last commit | Last update |
|---|---|---|
feat(platform): Add Platform config Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !6063 merge platformconfig into master feat(platform): Add Platform config Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: 背景: 原始的platform信息并沿用了机器层面命名。 本 PR 对平台配置域做概念规范化,统一到三个标准概念: 1. soc_series:原 short_soc_version(ini 键 Short_SoC_version),如 Ascend950; 2. soc_version:芯片分 bin(ini 键 SoC_version,每个 soc_version 一个 ini 文件),如 Ascend950PR_9589; 3. 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!6063 | 2 months ago | |
perf(machine): Move task-level fields to DynFuncHeader and isolate debug-only code Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !5588 merge perf/move-task-fields-to-dynfuncheader into master perf(machine): Move task-level fields to DynFuncHeader and isolate debug-only code Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: perf(machine): Move task-level fields to DynFuncHeader and isolate debug-only code ## 优化概述 将 task 级字段从 DynFuncData 移至 DynFuncHeader(每 task 一次赋值,而非每 func),缩小 per-func 结构体大小;隔离 debug-only 和 host-only 代码路径。 ## 优化点 ### 1. Task 级字段上移 - startArgs / stackWorkSpaceAddr / stackWorkSpaceSize 从 DynFuncData 移至 DynFuncHeader - FillOneDynFuncData 移除 startArgs / workspace 参数,在 BuildDynFuncData 中一次性赋值到 header - Reloc/backup/restore 在 header 层执行(每 task 一次,非每 func) ### 2. Debug-only 代码隔离 - CheckAddrAligned 和 leafFunc 统计包裹在 DEV_IF_DEBUG 中 - host-only 字段(exprNum / opAttrSize / rawTensorAddrSize / rawTensorDescSize)包裹在 DEV_IF_NONDEVICE 中 ### 3. 局部变量提取 - dupFunc.GetSource() 提取为局部变量 source(13 次调用 → 1 次) ### 4. CoreFuncParam 扩展 - funcHeader 指针加入 CoreFuncParam,供 AICORE kernel 直接访问 ### 5. 仿真器适配 - DynPvModelImpl::RunModel 构造 DynFuncHeader + DynFuncData 连续内存写入 GM,适配新的 kernel entry 签名 Changes: - Move startArgs/stackWorkSpaceAddr/stackWorkSpaceSize from DynFuncData to DynFuncHeader - Add funcHeader pointer to CoreFuncParam for AICORE kernel access - Update all consumers (aicore_entry, aicore_runtime, ctrlflow_cache, device_execute_context, PvModelImpl) to read from header - Wrap CheckAddrAligned and leafFunc stats in DEV_IF_DEBUG - Wrap host-only fields in DEV_IF_NONDEVICE - Extract dupFunc.GetSource() into local variable - Adapt DynPvModelImpl RunModel to construct DynFuncHeader for simulation Extracted from PR #5382 as independent commit, rebased onto latest master. Related Issues: #5382 See merge request: cann/pypto!5588 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 3 months ago |