| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 个月前 | |
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 个月前 | |
refactor(machine): Simplify mix send path and drop dead WrapManager APIs Co-authored-by: anyangle<anyangle@huawei.com> # message auto-generated for no-merge-commit merge: !5070 merge mix_combine into master refactor(machine): Simplify mix send path and drop dead WrapManager APIs Created-by: quadrate Commit-by: anyangle Merged-by: cann-robot Description: Mix调度逻辑优化 Related Issue:[2847](https://gitcode.com/cann/pypto/issues/2847) See merge request: cann/pypto!5070 | 3 个月前 | |
fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 个月前 | |
feat(machine): Optimize perf Co-authored-by: dty_30041779<daitianyi1@h-partners.com> # message auto-generated for no-merge-commit merge: !5431 merge oom into master feat(machine): Optimize perf Created-by: LordOfMysteries Commit-by: dty_30041779 Merged-by: cann-robot Description: https://gitcode.com/cann/pypto/issues/2597 # AICPU Ctrl / Sche 代码优化摘要 面向动态图 EXEC_DYN 热路径的微优化(不改变语义;DEV_INFO 日志级别保持原样)。 ## 主要改动 1. **Fill I/O / ItemPool** - 新增 ItemPool::AllocateBump / MakeRuntimeOutcastTensorBump:在 RunInit 后首次填充 root I/O 时跳过 freelist 分支与逐元素 ItemAt 检查。 2. **Stitch 挂边** - DevAscendFunctionDuppedStitchList::PushBack 由 std::function 改为模板 AllocFn,避免类型擦除与间接调用。 - Partial-update 表基址由 &table[0] 改为 Data(),空表安全且去掉无意义的下标检查。 3. **Workspace / Dupped 尺寸** - DevFunctionDuppedSlabMemObjSize 对同一 DevAscendProgram 缓存最大 Dupped 尺寸,避免每轮 launch 重复全表扫描。 4. **Ctrl / Sche 其它热路径** - Slot / Stitch / Task / AICore 管理路径的小幅去冗余、指针/数据预取与分支收敛(见对应 device_*_context 与 aicore_manager 改动)。 See merge request: cann/pypto!5431 | 3 个月前 | |
perf(machine): Prefilter stitch slot lists and isolate device-side checks Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !5584 merge perf/prefilter-stitch-slot-lists into master perf(machine): Prefilter stitch slot lists and isolate device-side checks Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: perf(machine): Prefilter stitch slot lists and isolate device-side checks ## 优化概述 将 stitch slot 预过滤逻辑从编译期前置到 encode 阶段,消除 device 侧热路径的冗余遍历与分支判断。 ## 优化点 ### 1. Stitch Slot 预过滤 - 新增 SlotMaskEntry + stitchUpdateSlotMaskMap,在 RunEncodeStage 中一次性计算所有 slot 的 stitch mask - device 侧 UpdateSlotsImpl / FastStitchConsumer / FastStitchProducer 直接遍历预计算列表,不再逐 slot 判断 ### 2. 统一 Update 数据结构 - DevAscendProgramPartialUpdate → DevAscendProgramUpdate + isPartial 标志 - InitPartialUpdateSlot → InitUpdateSlot,合并 partial/fullcover 遍历为单次循环 - DumpPartialUpdate → DumpUpdate,输出 isPartial + stitchCtrlBitMask ### 3. Mask 计算提取与复用 - 新增静态函数 CalculateStitchCtrlBitMaskForSlot,从 InitSinglePartialUpdateSlot 中抽离 mask 计算 - InitSingleFullCoverSlot / InitSinglePartialUpdateSlot 共用 stitchUpdateSlotMaskMap,避免重复计算 ### 4. Device 侧 Slot 预过滤列表 - 新增 4 个 DevLocalVector slot 列表(stitchIncastSlotList / updateIncastSlotList / stitchOutCastSlotList / updateOutCastSlotList) - InitStitchUpdateSlotPrefilterLists 在 encode 阶段填充,RefilterStitchUpdateSlotLists 二次过滤 ### 5. CellMatch 隔离与防护 - CellMatchHandle 中 DEV_IF_NONDEVICE 隔离 dim-zero 检查 - PrepareRuntimeDynamicPartialUpdateTable 增加 null data 守卫 Related Issues: #5382 See merge request: cann/pypto!5584 | 3 个月前 | |
perf(machine): Prefilter stitch slot lists and isolate device-side checks Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !5584 merge perf/prefilter-stitch-slot-lists into master perf(machine): Prefilter stitch slot lists and isolate device-side checks Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: perf(machine): Prefilter stitch slot lists and isolate device-side checks ## 优化概述 将 stitch slot 预过滤逻辑从编译期前置到 encode 阶段,消除 device 侧热路径的冗余遍历与分支判断。 ## 优化点 ### 1. Stitch Slot 预过滤 - 新增 SlotMaskEntry + stitchUpdateSlotMaskMap,在 RunEncodeStage 中一次性计算所有 slot 的 stitch mask - device 侧 UpdateSlotsImpl / FastStitchConsumer / FastStitchProducer 直接遍历预计算列表,不再逐 slot 判断 ### 2. 统一 Update 数据结构 - DevAscendProgramPartialUpdate → DevAscendProgramUpdate + isPartial 标志 - InitPartialUpdateSlot → InitUpdateSlot,合并 partial/fullcover 遍历为单次循环 - DumpPartialUpdate → DumpUpdate,输出 isPartial + stitchCtrlBitMask ### 3. Mask 计算提取与复用 - 新增静态函数 CalculateStitchCtrlBitMaskForSlot,从 InitSinglePartialUpdateSlot 中抽离 mask 计算 - InitSingleFullCoverSlot / InitSinglePartialUpdateSlot 共用 stitchUpdateSlotMaskMap,避免重复计算 ### 4. Device 侧 Slot 预过滤列表 - 新增 4 个 DevLocalVector slot 列表(stitchIncastSlotList / updateIncastSlotList / stitchOutCastSlotList / updateOutCastSlotList) - InitStitchUpdateSlotPrefilterLists 在 encode 阶段填充,RefilterStitchUpdateSlotLists 二次过滤 ### 5. CellMatch 隔离与防护 - CellMatchHandle 中 DEV_IF_NONDEVICE 隔离 dim-zero 检查 - PrepareRuntimeDynamicPartialUpdateTable 增加 null data 守卫 Related Issues: #5382 See merge request: cann/pypto!5584 | 3 个月前 | |
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 个月前 | |
fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5806 merge pyptolog_fix3 into master fix(machine): fix mismatch and incomplete error descriptions in machine and misc files Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine 日志内容整改 See merge request: cann/pypto!5806 | 2 个月前 | |
fix(machine): Fix localqueue reuse Co-authored-by: yanggen<yanggen4@hisilicon.com> # message auto-generated for no-merge-commit merge: !5684 merge master into master fix(machine): Fix localqueue reuse Created-by: yanggen Commit-by: yanggen Merged-by: cann-robot Description: 1.Local queue复用问题,因为aicore中push与get是通过taskid==0来保序的,当loacal queue的slab内存有复用时,会存在取到上一次执行的taskid值,导致执行报错 2.runing buffer中device task queue的复用问题:devicetaskque地址复用的时候,先在init里面计算了地址,然后才reset,aicore是起来后一直轮询,可能在ctrl reset之前就拿到地址了,然后读到的就是上一顿的head信息,直接拿了个null退出了 See merge request: cann/pypto!5684 | 3 个月前 | |
perf(machine): Optimize stitch code Co-authored-by: gaoxingwang<camuel.gao@huawei.com> # message auto-generated for no-merge-commit merge: !5531 merge perf/stitch-attr-optimize into master perf(machine): Optimize stitch code Created-by: gaoxingwang Commit-by: gaoxingwang Merged-by: cann-robot Description: # PR 5531 优化点 > perf(machine): Optimize stitch attr access with cachedAttrBase and if constexpr ## 优化点清单 | # | 优化点 | 改动文件 | 改前 | 改后 | 优化类型 | |---|--------|---------|------|------|---------| | 1 | 属性基址缓存 | dev_callop_attribute.h | 每次调用 3 次 GetOperationAttr 查表获取 offset/rawShape/validShape 指针 | cachedAttrBase 懒加载 1 次 GetSymoffset,后续指针偏移直接算 | 热路径查表消除 | | 2 | 结构体字段瘦身 | dev_encode_operation.h | shapeAttrIdx + wrapTaskHubOpIdx 两个字段 | 删除 shapeAttrIdx(改为 offsetAttrIdx+dim 按需算),wrapTaskHubOpIdx → stitchOpIdx(encode 期预赋值) | 结构体缩小 + runtime 查表消除 | | 3 | offsetAttrIdx 预累加 | dev_encode.cpp | runtime 每次查 opAttrOffsetList_ 获取 opAttrBase | encode 期 offsetAttrIdx += opAttrBase,runtime 直接读 | 以存代算 | | 4 | stitchOpIdx 预赋值 | dev_encode.cpp | runtime if (wrapTaskHubOpIdx != INVALID) 判断 + 赋值 | encode 期 stitchOpIdx = (hub存在) ? hubIdx : operationIdx | 以存代算 + 分支消除 | | 5 | 构造函数参数减少 | dev_encode.cpp | emplace_back(opIdx, coaIndex, coaIndex+dimSize, ...) 传 3 个 index | emplace_back(opIdx, coaIndex, ...) 传 2 个,shape 索引按需算 | 调用开销减少 | | 6 | skipExpression 模板消除 | dev_callop_attribute.h | template <bool skipExpression> 循环内 3×dim 次 if (skipExpression) 运行时分支 | 去掉模板参数和运行时分支 | 编译期分支消除 | | 7 | 循环合并 | dev_callop_attribute.h | CheckOffsetAndValidShapeInRawShape 两个独立 for 循环 | 合并为一个循环 | 循环开销减半 | | 8 | IsCellMatchDescFillReady 删除 | dev_callop_attribute.h | runtime 每次遍历所有维度检查 cellShape/stride > 0 | 删除函数,host encode 期保证 desc 已填充 | device 侧检查消除 | | 9 | Dump 隔离 | device_slot_context.cpp / device_stitch_context.cpp / dump_device_topo.cpp | DumpProducerCellAccess/DumpConsumerCellAccess 裸调用 | DEV_IF_NONDEVICE 包裹,device 编译期排除 | device 侧零开销 | | 10 | unlikely 标注 | dev_callop_attribute.h | if (clamped) 无分支预测提示 | if (unlikely(clamped)) | 分支预测优化 | | 11 | CellMatchProcessByDim 局部变量 | dev_encode_function_stitch.h | switch (cellMatchTableDesc.cellShape.dimSize) 每次读结构体字段 | switch (dims) 用局部变量 | 循环不变量外提 | | 12 | CellMatchHandle dims 外提 | dev_encode_function_stitch.h | 循环内 cellMatchTableDesc.GetDimensionSize() 重复调用 | 提到循环外存 dims | 循环不变量外提 | | 13 | Process 签名加 desc | dev_encode_function_stitch.h | 每个 Handler 内部重复读 cellMatchTableDesc | 通过参数传入 const DevCellMatchTableDesc& desc | 参数传递优化 | | 14 | runtime wrapTaskHubOpIdx 查表消除 | device_stitch_context.cpp | runtime if (consumer.wrapTaskHubOpIdx != INVALID) 判断 + 赋值 consumerOpIdx | 直接用 consumer.stitchOpIdx | runtime 分支消除 | | 15 | GetTensorOffsetAndValidShape 调用优化 | device_stitch_context.cpp | 传 operationIndex + offsetAttrIdx,函数内部查 GetOperationAttr | 传 offsetAttrIdx + cachedAttrBase,函数内部用缓存指针 | 热路径查表消除 | See merge request: cann/pypto!5531 | 3 个月前 | |
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 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 4 个月前 |