| Files | Last commit | Last update |
|---|---|---|
feat(codegen): Support aicore print Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5545 merge aicore_print into master feat(codegen): Support aicore print Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: ### 目标 为 PyPTO AICore 代码提供 CANN asc_printf / asc_dump 的薄封装(aicore_asc_*),并在 **leaf CCE codegen** 与 **entry kernel 编译** 两条路径自动注入编译开关与头文件路径,使调试 print / dump 与 AscendC 共用同一套 ASC debug ring。 --- ### 新增文件 | 文件 | 作用 | |------|------| | framework/src/interface/machine/device/tilefwk/aicore_asc_printf.h | 封装 __asc_aicore::printf,提供 PYPTO_AICORE_PRINTF / PYPTO_AICORE_PRINTF_WITH_CORE | | framework/src/interface/machine/device/tilefwk/aicore_asc_dump.h | 封装 GM / UB / L1 / L0C 指针 dump,提供 PYPTO_AICORE_DUMP_* 宏 | | framework/src/interface/machine/device/tilefwk/aicore_asc_debug.h | 总头文件,聚合 printf + dump | --- ### 修改文件 | 文件 | 改动 | |------|------| | framework/src/codegen/npu/codegen_npu.cpp | GenInclude 固定插入 #include "tilefwk/aicore_asc_debug.h" | | framework/src/codegen/npu/cloudnpu/codegen_cloudnpu.cpp/.h | 新增 BuildIncludes,自动注入 ASC 编译 flag | | framework/src/interface/machine/device/tilefwk/aicore_entry.h | include aicore_asc_debug.h | | framework/src/machine/compile/aicore_compiler.cpp | 新增 BuildAscPrintfCompileFlags(),entry 编译路径注入 ASC flag | --- ### 核心设计 #### 1. Print 封装(aicore_asc_printf.h) - 底层调用 __asc_aicore::printf,输出格式:[core=%u][t=%lu] <用户 fmt> - include 前临时定义 __NPU_DEVICE__,跳过 CANN print_common_head(),避免打印编译期时间戳 - PYPTO_AICORE_PRINTF_CORE_ID() 规则: - entry(__MIX__ + __AIV__):get_block_idx() * get_subblockdim() + get_subblockid() + get_block_num() - leaf(仅 __AIV__):get_block_idx() - 未定义 __ENABLE_ASC_PRINTF__ 时,宏展开为 ((void)0),零运行时开销 #### 2. Dump 封装(aicore_asc_dump.h) - 基于裸指针,适配 PyPTO 无 AscendC Tensor 的编程模型 - 显式调用 asc_dump_gm / asc_dump_ubuf / asc_dump_l1buf / asc_dump_cbuf,兼容旧版 CANN - UB 指针须通过 ( __ubuf__ T*)(uint64_t)ptr 中转,禁止 float* 直接转 __ubuf__ #### 3. 编译注入(两条路径) | 路径 | 入口 | 行为 | |------|------|------| | Leaf CCE | CodeGenCloudNPU::BuildIncludes | 检测 $ASCEND_HOME_PATH/asc/include 存在时,追加 -D__ENABLE_ASC_PRINTF__ -I.../asc/include -I.../asc | | Entry kernel | aicore_compiler.cpp::BuildAscPrintfCompileFlags | 同上,使用 -isystem 注入;启用 ASC 时 warning 降为 -Wall(不用 -Werror,避免 CANN 头文件告警) | | Codegen 头 | CodeGenNPU::GenInclude | 固定 #include "tilefwk/aicore_asc_debug.h" | | Entry 头 | aicore_entry.h | 同上 include | #### 4. 其他细节 - entry 编译命令缓冲区从 **2K 扩至 4K**(-isystem 绝对路径较长,防止 snprintf 截断) - 保留 master 侧已有能力:RunBishengQuiet、requiresSimt / SIMT 编译选项 - 启用条件:**检测到 ASC 工具链即自动开启**,非 tile_fwk_config.json 配置项 --- ### 使用示例 ```cpp #include "tilefwk/aicore_asc_debug.h" // entry:推荐显式传 blockIdx,与调度对齐 PYPTO_AICORE_PRINTF_WITH_CORE(ctx->blockIdx, "taskId=%u\n", taskId); // leaf:简单打印 PYPTO_AICORE_PRINTF("before TAdd\n"); // UB dump(须 uint64_t 中转) PYPTO_AICORE_DUMP_UBUF((__ubuf__ float*)(uint64_t)ubPtr, 3, 16); // GM dump PYPTO_AICORE_DUMP_GM((__gm__ float*)gmPtr, 1, 16); See merge request: cann/pypto!5545 | 2 months ago | |
fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6246 merge bugfix into master fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: **根因:** 使能 ASC print/dump后,检测到 $ASCEND_HOME_PATH/asc/include 就默认注入 -D__ENABLE_ASC_PRINTF__,entry/leaf/mid 都会拉 ASC 调试头。新 ASC 头依赖变了,旧包碰不到的符号被编进 PyPTO 多 TU 链接路径,于是炸了两层:CCE上报 CACHE_LINE_SIZE 宏与 ASC const 冲突(F70002);ld -r 时报 g_tilingKey 强符号重复(F70003)。**本质是 CANN ASC 版本问题** **修复:** 1. CACHE_LINE_SIZE 改为 AicorePrintConst::CACHE_LINE_SIZE,避免与 ASC 常量冲突。 2. 用 -DTILING_KEY_VAR=0(头文件内再兜底)抑制 g_tilingKey 多 TU 重复定义。 3. PYPTO_ENABLE_AICORE_PRINT=true 才注入 __ENABLE_ASC_PRINTF__,默认关闭,不再拉 ASC dump/printf 头;打开后 1/2 仍作兼容。 See merge request: cann/pypto!6246 | 2 months ago | |
fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6246 merge bugfix into master fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: **根因:** 使能 ASC print/dump后,检测到 $ASCEND_HOME_PATH/asc/include 就默认注入 -D__ENABLE_ASC_PRINTF__,entry/leaf/mid 都会拉 ASC 调试头。新 ASC 头依赖变了,旧包碰不到的符号被编进 PyPTO 多 TU 链接路径,于是炸了两层:CCE上报 CACHE_LINE_SIZE 宏与 ASC const 冲突(F70002);ld -r 时报 g_tilingKey 强符号重复(F70003)。**本质是 CANN ASC 版本问题** **修复:** 1. CACHE_LINE_SIZE 改为 AicorePrintConst::CACHE_LINE_SIZE,避免与 ASC 常量冲突。 2. 用 -DTILING_KEY_VAR=0(头文件内再兜底)抑制 g_tilingKey 多 TU 重复定义。 3. PYPTO_ENABLE_AICORE_PRINT=true 才注入 __ENABLE_ASC_PRINTF__,默认关闭,不再拉 ASC dump/printf 头;打开后 1/2 仍作兼容。 See merge request: cann/pypto!6246 | 2 months ago | |
fix(machine): Avoid mix+mix gmstack stomping Co-authored-by: xuyi_37<xuyi37@huawei.com> # message auto-generated for no-merge-commit merge: !6909 merge master into master fix(machine): Avoid mix+mix gmstack stomping Created-by: xuyi_37 Commit-by: xuyi_37 Merged-by: cann-robot Description: fix(machine): Avoid mix+mix gmstack stomping Related Issue: [#3563](https://gitcode.com/cann/pypto/issues/3563) See merge request: cann/pypto!6909 | 1 month ago | |
feat(Machine): Pointer Quant optimization Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !6689 merge aicore-quant-pointer into master feat(Machine): Pointer Quant optimization Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(Machine): Pointer Quant optimization See merge request: cann/pypto!6689 | 2 months ago | |
feat(Machine): Pointer Quant optimization Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !6689 merge aicore-quant-pointer into master feat(Machine): Pointer Quant optimization Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(Machine): Pointer Quant optimization See merge request: cann/pypto!6689 | 2 months ago | |
fix(machine): DRCORE balanced scheduling Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !6627 merge br_ctu into master fix(machine): DRCORE balanced scheduling Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!6627 | 1 month ago | |
fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6246 merge bugfix into master fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: **根因:** 使能 ASC print/dump后,检测到 $ASCEND_HOME_PATH/asc/include 就默认注入 -D__ENABLE_ASC_PRINTF__,entry/leaf/mid 都会拉 ASC 调试头。新 ASC 头依赖变了,旧包碰不到的符号被编进 PyPTO 多 TU 链接路径,于是炸了两层:CCE上报 CACHE_LINE_SIZE 宏与 ASC const 冲突(F70002);ld -r 时报 g_tilingKey 强符号重复(F70003)。**本质是 CANN ASC 版本问题** **修复:** 1. CACHE_LINE_SIZE 改为 AicorePrintConst::CACHE_LINE_SIZE,避免与 ASC 常量冲突。 2. 用 -DTILING_KEY_VAR=0(头文件内再兜底)抑制 g_tilingKey 多 TU 重复定义。 3. PYPTO_ENABLE_AICORE_PRINT=true 才注入 __ENABLE_ASC_PRINTF__,默认关闭,不再拉 ASC dump/printf 头;打开后 1/2 仍作兼容。 See merge request: cann/pypto!6246 | 2 months ago | |
fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6246 merge bugfix into master fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: **根因:** 使能 ASC print/dump后,检测到 $ASCEND_HOME_PATH/asc/include 就默认注入 -D__ENABLE_ASC_PRINTF__,entry/leaf/mid 都会拉 ASC 调试头。新 ASC 头依赖变了,旧包碰不到的符号被编进 PyPTO 多 TU 链接路径,于是炸了两层:CCE上报 CACHE_LINE_SIZE 宏与 ASC const 冲突(F70002);ld -r 时报 g_tilingKey 强符号重复(F70003)。**本质是 CANN ASC 版本问题** **修复:** 1. CACHE_LINE_SIZE 改为 AicorePrintConst::CACHE_LINE_SIZE,避免与 ASC 常量冲突。 2. 用 -DTILING_KEY_VAR=0(头文件内再兜底)抑制 g_tilingKey 多 TU 重复定义。 3. PYPTO_ENABLE_AICORE_PRINT=true 才注入 __ENABLE_ASC_PRINTF__,默认关闭,不再拉 ASC dump/printf 头;打开后 1/2 仍作兼容。 See merge request: cann/pypto!6246 | 2 months ago | |
feat(machine): Add log level control and timestamp to aicore print Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5352 merge feat/aicore-log-level-control into master feat(machine): Add log level control and timestamp to aicore print Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: ## 关联 Issue Closes #2915 ## 改动说明 为 AICore Print 系统添加日志级别控制、时间戳记录和专用 host 输出宏。 ### 改动内容 1. **日志级别控制** - 新增 AicoreLogLevel 枚举(DEBUG/INFO/WARN/ERROR/NONE) - LogContext 新增 logLevel 字段,由 DevDfxArgs.logLevel(host 侧 dlog_getlevel)传递到 device - AicoreLogger::Init() 接收 level 参数并写入 ctx_.logLevel - 新增 AICORE_LOGD/LOGI/LOGW/LOGE 宏,参照 DEV_INFO/DEV_DEBUG 模式按级别过滤 2. **时间戳记录** - 新增 TimestampMarker TLV 记录类型 - AiCoreLogFWithLevel 中通过 get_sys_cnt() 编码 device 侧周期计数器值 - Host 侧 Read() 解码时间戳并通过 outTimestamp 参数返回 3. **Host 侧专用日志宏** - LogModule 枚举新增 AICORE - 新增 AICORE_HOST_LOGD/LOGI/LOGW/LOGE 宏,不带 host file:line 前缀,使用 device cycle 作为时间戳 - DumpAicoreLog 按级别 switch 调用对应宏 4. **MAX_DIMS 重定义修复** - core_func_data.h 的 MAX_DIMS=8 重命名为 MAX_TENSOR_INFO_DIMS,避免与 layout.h 的 MAX_DIMS=5 冲突 ### 输出格式示例 [core-0][cycle=1234567890][INFO] === After TLoad === [core-0][cycle=1234567895][DEBUG] gmTensor_1 addr=0x... [core-0][cycle=1234567900][INFO] === After TAdd === ### 文件变更 | 文件 | 改动 | |------|------| | aicore_print_base.h | AicoreLogLevel 枚举、LogContext.logLevel、LogLevelMarker/TimestampMarker DataType | | aicore_print_logger.h | Init() 接收 level、EncodeLogLevel/EncodeTimestamp、Read() 返回 level+timestamp | | aicore_print.h | AiCoreLogFWithLevel、AICORE_LOGD/LOGI/LOGW/LOGE 宏 | | aicore_print_host_decode.h | DecodeLogLevelMarker | | aicore_entry.h | KernelEntry 读取 DevDfxArgs.logLevel 传入 InitCtx | | tilefwk_log.h | LogModule 新增 AICORE | | pypto_fwk_log.h | AICORE_HOST_LOGD/LOGI/LOGW/LOGE 宏 | | aicore_print_host_manager.cpp | DumpAicoreLog 按级别+时间戳输出 | | core_func_data.h | MAX_DIMS → MAX_TENSOR_INFO_DIMS | ## 验证方式 1. 设置 ASCEND_GLOBAL_LOG_LEVEL=1(INFO),运行用例,grep "AICORE" ./wk 验证仅 INFO 及以上级别输出 2. 设置 ASCEND_GLOBAL_LOG_LEVEL=0(DEBUG),验证 DEBUG 日志出现 3. 验证每条日志带 [cycle=N] 时间戳 See merge request: cann/pypto!5352 | 3 months ago | |
fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !6246 merge bugfix into master fix(codegen): Avoid ASC CACHE_LINE_SIZE and g_tilingKey link conflicts Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: **根因:** 使能 ASC print/dump后,检测到 $ASCEND_HOME_PATH/asc/include 就默认注入 -D__ENABLE_ASC_PRINTF__,entry/leaf/mid 都会拉 ASC 调试头。新 ASC 头依赖变了,旧包碰不到的符号被编进 PyPTO 多 TU 链接路径,于是炸了两层:CCE上报 CACHE_LINE_SIZE 宏与 ASC const 冲突(F70002);ld -r 时报 g_tilingKey 强符号重复(F70003)。**本质是 CANN ASC 版本问题** **修复:** 1. CACHE_LINE_SIZE 改为 AicorePrintConst::CACHE_LINE_SIZE,避免与 ASC 常量冲突。 2. 用 -DTILING_KEY_VAR=0(头文件内再兜底)抑制 g_tilingKey 多 TU 重复定义。 3. PYPTO_ENABLE_AICORE_PRINT=true 才注入 __ENABLE_ASC_PRINTF__,默认关闭,不再拉 ASC dump/printf 头;打开后 1/2 仍作兼容。 See merge request: cann/pypto!6246 | 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 | |
feator(machine): Add prof for draicore Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5627 merge br_prof into master feator(machine): Add prof for draicore Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!5627 | 3 months ago | |
feat(distributed): Reduce signal memory usage Co-authored-by: codehjp423<hanjunpei@huawei.com> # message auto-generated for no-merge-commit merge: !2227 merge maxtile into master feat(distributed): Reduce signal memory usage Created-by: codehjp423 Commit-by: codehjp423 Merged-by: cann-robot Description: feat(distributed): Reduce signal memory usage 此PR是为了解决如下问题:由于pypto存在切分,因此每一个在tensor graph中的signal,经过expandfunction后会变成多份;但是在创建signal tensor时并不清楚实际需要创建多大的shape,为了解决这个问题,原来解决方案是创建一个“足够大”的shape,但是这会造成内存使用的浪费。 Changes: ShmemTensor结构增加了signalOp,用于在tensor graph中记录创建signal的bindtensor op tensor graph中,在处理ShmemSignal时,获取切分信息,根据signal shape和tileshape计算出maxtilenum,如果maxtilenum超过signal tensor当前maxtilenum,则更新 在分配shmem signal时,按照最终的maxtilenum分配内存 See merge request: cann/pypto!2227 | 7 months ago | |
style(all): Apply additional clang-format corrections across codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4883 merge style-cpp into master style(all): Apply additional clang-format corrections across codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Apply additional clang-format corrections across codebase See merge request: cann/pypto!4883 | 4 months ago | |
feat(machine): Support BN loop parallel Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !2351 merge bn_new into master feat(machine): Support BN loop parallel Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: Support BN loop parallel Related Issue: [#486](https://gitcode.com/cann/pypto/issues/486) See merge request: cann/pypto!2351 | 7 months ago | |
feat(machine): Support static succ node parallel resolve for large fan-out Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !6829 merge drco-static-succ-unify into master feat(machine): Support static succ node parallel resolve for large fan-out Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: feat(machine): Support static succ node parallel resolve for large fan-out Large fan-out DRCO ops resolve every successor edge from one ordered flat table: the decrement serializes and the scatter skews across cores. This PR chunks large fan-out ops into type-homogeneous 64B static succ nodes and resolves them in parallel across core-type-balanced bands. On top of the original #6737 content it unifies ALL DRCO successors into the succNode storage (flat table removed) and shrinks the stitch matrix slot back to u32. Supersedes #6737 (contains its full changes plus the three refactor commits). Changes (from #6737): - Encode-time HUB expansion: single-pred HUB successors move one hop into the predecessor entry set (edge move, depth 1, parity marking on HUB chains); the expanded HUB keeps a no-op entry so edge conservation holds (drcoSuccCnt == staticEdges asserted at encode time) - Chunking: ops whose DRCO entry count exceeds DRCO_STATIC_SUCC_THRESHOLD (16) with a unique pred and non-HUB_MIX core type are chunked into 64B DevAscendFunctionStaticSuccNode entries (coreType-homogeneous, capacity min(DRCO_SUCC_NODE_TASK_CAP=6, N/2), at least 2 nodes) in a devprog-resident flat array - Balanced parallel scatter: typed row domains per core type (AIC/AIV bands in the shared stitch matrix), per-type push cursors seeded to the domain-next core at node pop; HUB-type nodes ordered last and resolved locally on the producer via its hubStack; typed ready-matrix cursors refreshed from the scatter cursor so producer-side pushes land after the scattered bands Refactor on top: - Unify flat succ table into drcoStaticSuccNodeList_: non-chunked ops append capacity-15 mixed nodes resolved in place by the producer core (no scatter, no cursor seeding, behavior-neutral pairing within node bounds); SuccInfo low 32 bits unify to succNodeIndex/succNodeSize and bit63 narrows to the parallel-resolve flag DRCO_SUCC_PARALLEL_BIT; ResolveHubMixTask iterates nodes per entry with identical semantics - Fold the node region offset into funcInfoAndStaticDataOffset bits 59-30, dropping the standalone staticSuccNodeListOffset field and restoring the upstream two-field DrcoRootFuncData shape - Shrink stitch matrix slots to u32: 21-bit per-func node index + 10-bit producer funcId + 1-bit static flag; consumers restore nodes via funcId -> rootFuncData -> node region base + index; the u64-only atomic primitives are removed Validation (mla_prolog_v3_l0_id0002, C310, from #6737): - capture e2e_mean 239.4 -> 202.1us vs upstream base, eager 513.5/524.3 -> 475.7/476.8us; quant variant capture -19.5% - balance verified Rope 64/64 and qb/qNope 32/32 lanes Commit list: - feat(machine): Emit both flat and static succ node encodings for drco - refactor(drco): Unify flat succ table into static succ node storage - refactor(drco): Shrink stitch matrix slot back to u32 node index - refactor(drco): Rename succ node storage and parallel mode bit Related requirement: #3486 See merge request: cann/pypto!6829 | 1 month ago | |
fix(machine): Add aicore-resolve macro Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !5549 merge master into master fix(machine): Add aicore-resolve macro Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: fix(machine): Add aicore-resolve macro See merge request: cann/pypto!5549 | 3 months ago | |
fix(machine): DRCORE balanced scheduling Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !6627 merge br_ctu into master fix(machine): DRCORE balanced scheduling Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: PR 应该避免没有描述信息,描述信息的最重要的作用是描述修改意图,应该清晰明了。例如:标题中包含了 fix 标签,如果没有描述信息,就需要Review人员猜测PR具体修复了哪些内容,或者怀疑修改的必要性。如果PR和特定的Issue相关,可以单独包含一行 Related Issue: 放到描述信息最后。 下面是一个典型的PR描述信息: The origin issue template brings too many noise, it's not suitable for git message. eg: comments are not removed, labels are redundant as the PR tile already contains the tag. The guide gives a clear suggestion on how to write the PR body. Related Issue: #1234,#5678 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!6627 | 1 month ago | |
perf(machine): Rework DRCO local matrix to merged u64 pair-word per core type Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !6835 merge master into master perf(machine): Rework DRCO local matrix to merged u64 pair-word per core type Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: perf(machine): Rework DRCO local matrix to merged u64 pair-word per core type See merge request: cann/pypto!6835 | 1 month ago | |
feat(machine): Support static succ node parallel resolve for large fan-out Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !6829 merge drco-static-succ-unify into master feat(machine): Support static succ node parallel resolve for large fan-out Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: feat(machine): Support static succ node parallel resolve for large fan-out Large fan-out DRCO ops resolve every successor edge from one ordered flat table: the decrement serializes and the scatter skews across cores. This PR chunks large fan-out ops into type-homogeneous 64B static succ nodes and resolves them in parallel across core-type-balanced bands. On top of the original #6737 content it unifies ALL DRCO successors into the succNode storage (flat table removed) and shrinks the stitch matrix slot back to u32. Supersedes #6737 (contains its full changes plus the three refactor commits). Changes (from #6737): - Encode-time HUB expansion: single-pred HUB successors move one hop into the predecessor entry set (edge move, depth 1, parity marking on HUB chains); the expanded HUB keeps a no-op entry so edge conservation holds (drcoSuccCnt == staticEdges asserted at encode time) - Chunking: ops whose DRCO entry count exceeds DRCO_STATIC_SUCC_THRESHOLD (16) with a unique pred and non-HUB_MIX core type are chunked into 64B DevAscendFunctionStaticSuccNode entries (coreType-homogeneous, capacity min(DRCO_SUCC_NODE_TASK_CAP=6, N/2), at least 2 nodes) in a devprog-resident flat array - Balanced parallel scatter: typed row domains per core type (AIC/AIV bands in the shared stitch matrix), per-type push cursors seeded to the domain-next core at node pop; HUB-type nodes ordered last and resolved locally on the producer via its hubStack; typed ready-matrix cursors refreshed from the scatter cursor so producer-side pushes land after the scattered bands Refactor on top: - Unify flat succ table into drcoStaticSuccNodeList_: non-chunked ops append capacity-15 mixed nodes resolved in place by the producer core (no scatter, no cursor seeding, behavior-neutral pairing within node bounds); SuccInfo low 32 bits unify to succNodeIndex/succNodeSize and bit63 narrows to the parallel-resolve flag DRCO_SUCC_PARALLEL_BIT; ResolveHubMixTask iterates nodes per entry with identical semantics - Fold the node region offset into funcInfoAndStaticDataOffset bits 59-30, dropping the standalone staticSuccNodeListOffset field and restoring the upstream two-field DrcoRootFuncData shape - Shrink stitch matrix slots to u32: 21-bit per-func node index + 10-bit producer funcId + 1-bit static flag; consumers restore nodes via funcId -> rootFuncData -> node region base + index; the u64-only atomic primitives are removed Validation (mla_prolog_v3_l0_id0002, C310, from #6737): - capture e2e_mean 239.4 -> 202.1us vs upstream base, eager 513.5/524.3 -> 475.7/476.8us; quant variant capture -19.5% - balance verified Rope 64/64 and qb/qNope 32/32 lanes Commit list: - feat(machine): Emit both flat and static succ node encodings for drco - refactor(drco): Unify flat succ table into static succ node storage - refactor(drco): Shrink stitch matrix slot back to u32 node index - refactor(drco): Rename succ node storage and parallel mode bit Related requirement: #3486 See merge request: cann/pypto!6829 | 1 month ago | |
fix(machine): Add aicore-resolve macro Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !5549 merge master into master fix(machine): Add aicore-resolve macro Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: fix(machine): Add aicore-resolve macro See merge request: cann/pypto!5549 | 3 months ago | |
feat(machine): Add basic data structure header for cord. Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !5349 merge cord-data into master feat(machine): Add basic data structure header for cord. Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(machine): Add basic data structure header for cord. See merge request: cann/pypto!5349 | 3 months ago | |
feat(machine): Add basic data structure header for cord. Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !5349 merge cord-data into master feat(machine): Add basic data structure header for cord. Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: feat(machine): Add basic data structure header for cord. See merge request: cann/pypto!5349 | 3 months ago | |
fix(machine): Add aicore-resolve macro Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !5549 merge master into master fix(machine): Add aicore-resolve macro Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: fix(machine): Add aicore-resolve macro See merge request: cann/pypto!5549 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 4 months ago | ||
| 7 months ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago |