| Files | Last commit | Last update |
|---|---|---|
feat(platform): Use aclrtGetDeviceInfo to get aicpu cnt Co-authored-by: huanglu<huanglu22@hisilicon.com> # message auto-generated for no-merge-commit merge: !4844 merge master into master feat(platform): Use aclrtGetDeviceInfo to get aicpu cnt Created-by: lululu40888 Commit-by: huanglu Merged-by: cann-robot Description: feat(platform): Use AmlDeviceGetCpuInfo to get aicpu cnt See merge request: cann/pypto!4844 | 4 months ago | |
fix(dfx): Modify error code h path Co-authored-by: meiqing2<meiqing2@hisilicon.com> # message auto-generated for no-merge-commit merge: !2697 merge errcode into master fix(dfx): Modify error code h path Created-by: meiqing2 Commit-by: meiqing2 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 规范](https://gitcode.com/cann/pypto/blob/master/docs/contribute/pull-request.md#commit-message) See merge request: cann/pypto!2697 | 7 months ago | |
feat(codegen): Add op magic comment after TileOp Co-authored-by: Bee.Hujun<Bee.hujun@huawei.com> # message auto-generated for no-merge-commit merge: !2250 merge codegen/add_op_magic into master feat(codegen): Add op magic comment after TileOp Created-by: cam_bxh Commit-by: Bee.Hujun Merged-by: cann-robot Description: Related Issue: https://gitcode.com/cann/pypto/issues/1060 Add op magic comment after TileOp See merge request: cann/pypto!2250 | 7 months ago | |
feat(interpreter): Add fp8e6m2 and hf4 dtype support Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !7193 merge 1028_hf4 into master feat(interpreter): Add fp8e6m2 and hf4 dtype support Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: 精度工具增加hf4和fp8e6m2 See merge request: cann/pypto!7193 | 1 month ago | |
fix(all): Fix spelling errors in source comments and diagnostic messages Co-authored-by: wangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !5392 merge fix/spelling-errors-2908 into master fix(all): Fix spelling errors in source comments and diagnostic messages Created-by: hwwangmingjun Commit-by: wangmingjun Merged-by: cann-robot Description: fix(all): Fix spelling errors in source comments and diagnostic messages 修复源码注释、错误信息和调试日志中多处英文拼写错误,避免阅读诊断输出时产生误解。 Changes: - device_error_code.h:defalut -> default - codegen_vector.cpp:occured/unsupport -> occurred/unsupported - operation_impl.cpp:interger -> integer - device_task_context.cpp:Inital -> Initial - directed_graph_util.h:lenght -> length - tune_sync_for_vf.cpp:falied -> failed(4 处) - graph_utils.h / expand_function.cpp:seperate -> separate - cube_process.cpp:invlid -> invalid - pil2ir.py:funtion -> function - test_dynamic_mm.cpp:intput -> input(4 处) Related Issues: #2908 See merge request: cann/pypto!5392 | 3 months ago | |
feat(dist): Support distribute for pypto_pro Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !7250 merge dist3 into master feat(dist): Support distribute for pypto_pro Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: distributed communication (dist) support (UBMEM&URMA) Adds kernel-side distributed communication capability across the device/machine/IR/codegen/frontend/Python-binding stack: - device: add device-side distributed runtime header pypto_distribute.h (windows, channels, transfers), plus pypto_panic/pypto_assert helpers and DIST_CHECK macros - machine: add WindowContext host runtime and pybind dist module, with a DistributeContext interface - IR: add WindowType and the dist.* op definitions (dist_ops.cpp/py) - codegen: lower dist.* ops to CCE (backend_cce_ops.cpp, backend_cce_block_out_ops.cpp, cce_codegen.cpp); fix line wrapping of the set_ctrl_spr atomic-op-type error message - frontend: expose pld.* APIs (windows/channels/transfers) inside kernels; add pl.tensor_view for no-copy GM tensor sub-views - runtime: resolve dist include paths and sanitizer traps for kernels at compile time - parser: drop stale design references from parser docs - tests: add pld.* frontend dispatch UTs, window ST (test_window.py), and tensor_view parsing/CCE codegen UTs See merge request: cann/pypto!7250 | 29 days ago | |
refactor(frontend): Adding errCode for frontend. Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !2563 merge log into master refactor(frontend): Adding errCode for frontend. Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: 1. FUNCTION_LOGE错误码补充 2. ASSERT错误码补充 3. python前端封装FrontendError 补充错误码打印 4. FUNCTION日志宏前缀统一为"FE", 即Frontend See merge request: cann/pypto!2563 | 6 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): 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 | |
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 | |
fix(function): Prevent coredump when JIT loop recording aborts mid-path Co-authored-by: Immutable01<gaoqiancheng@huawei.com> # message auto-generated for no-merge-commit merge: !4996 merge 0720_seg into master fix(function): Prevent coredump when JIT loop recording aborts mid-path Created-by: Immutable01 Commit-by: Immutable01 Merged-by: cann-robot Description: ## Summary 修复 JIT 录制在 loop 中途失败后继续编译/运行导致的 heap corruption( corrupted size vs. prev_size / double free),并完善异常路径下的 Program 生命周期管理。 ## Problem 上一个kernal 在 pypto.loop 录制中途失败(如 transpose 参数校验)时: 1. 异常路径若仍走 EndFunction() 或 Reset() 析构不完整 loop-path 图,会破坏堆; 2. RecordLoopFunc 在异常 unwind 与进程退出 frame 清理时被二次析构,对空 loopStack_ 执行 pop_back() 触发 coredump。 ## Solution - **录制 abort**:pypto.function 异常时改调 AbortRecording(),不再 EndFunction() - **不完整图保活**:AbandonIncompleteRecording() 将半成品图泄漏至 AbandonedGraphPool,避免 ~Function - **成功编译 pin**:RegisterLastCompiledKernel() 通过 KernelBinary::pinnedGraph_ 持有 functionmap,Reset() 可安全 clear() - **Python 缓存**:JIT __call__ 失败时 _drop_kmodule_cache(),避免复用脏 KernelModule - **Loop 析构**:RecordLoopFunc::~RecordLoopFunc() 仅在仍为 stack 顶时才 pop(幂等) - **优化**:HasIncompleteRecordingState() 使 abort 路径幂等;CompileIfNeeded 仅在状态仍脏时清理 ## Changed Files | 层 | 文件 | |----|------| | C++ | program.cpp/h, recorder.cpp, tensor_slot.h, kernel_binary.cpp/h | | Bindings | runtime.cpp, controller.cpp | | Python | _controller.py, frontend/parser/entry.py | See merge request: cann/pypto!4996 | 4 months ago | |
refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 months ago | |
feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Co-authored-by: m0_71310678<lizhexun2@huawei.com> # message auto-generated for no-merge-commit merge: !7126 merge kirin9050-matmul-mergepr into master feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Created-by: m0_71310678 Commit-by: m0_71310678 Merged-by: cann-robot Description: feat(kirin9050): Support matmul macro instruction with pre-stage quant/dequant Support Kirin9050 matmul macro instruction bring-up: - macro matmul codegen/tileop (attrs, quant, inplace, infer), decoupled from generic path - route quant_pre through macro matmul; GEMV routing and fp16/int8 K-slice clamps - L1->GM TSTORE direct store, l12ub/ub2l1 support - rework matmul quant UT ids, shapes and tile-split coverage (Q16.16 semantics) Changes: - Add Kirin9050 (NCH) LiteNPU platform support and matmul macro instruction codegen/tileop - Add l12ub/ub2l1 data path and per-channel quant_pre routing through macro matmul - Add Kirin9030/Kirin9050/KirinX90 codegen UT coverage for matmul, attention and other single operations See merge request: cann/pypto!7126 | 1 month ago | |
feat(dist): Support distribute for pypto_pro Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !7250 merge dist3 into master feat(dist): Support distribute for pypto_pro Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: distributed communication (dist) support (UBMEM&URMA) Adds kernel-side distributed communication capability across the device/machine/IR/codegen/frontend/Python-binding stack: - device: add device-side distributed runtime header pypto_distribute.h (windows, channels, transfers), plus pypto_panic/pypto_assert helpers and DIST_CHECK macros - machine: add WindowContext host runtime and pybind dist module, with a DistributeContext interface - IR: add WindowType and the dist.* op definitions (dist_ops.cpp/py) - codegen: lower dist.* ops to CCE (backend_cce_ops.cpp, backend_cce_block_out_ops.cpp, cce_codegen.cpp); fix line wrapping of the set_ctrl_spr atomic-op-type error message - frontend: expose pld.* APIs (windows/channels/transfers) inside kernels; add pl.tensor_view for no-copy GM tensor sub-views - runtime: resolve dist include paths and sanitizer traps for kernels at compile time - parser: drop stale design references from parser docs - tests: add pld.* frontend dispatch UTs, window ST (test_window.py), and tensor_view parsing/CCE codegen UTs See merge request: cann/pypto!7250 | 29 days 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 | |
fix(ir): Select merged valid_shape by branch condition Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !5840 merge fix/phi-shape into master fix(ir): Select merged valid_shape by branch condition Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!5840 | 2 months ago | |
fix(operation): Fix validshape of cat not correct Co-authored-by: lidongsheng<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !6250 merge cat into master fix(operation): Fix validshape of cat not correct Created-by: tsungl4 Commit-by: lidongsheng Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!6250 | 2 months ago | |
feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Co-authored-by: Zehai<wangzehai3@huawei.com> Co-authored-by: hongyiliu111<liuhongyi1@huawei.com> Co-authored-by: yuxin5<yuxin5@huawei.com> Co-authored-by: xutianlong1<xutianlong1@huawei.com> Co-authored-by: zhouxuan78<zhouxuan78@huawei.com> # message auto-generated for no-merge-commit merge: !6752 merge dev into master feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Created-by: yuxin5 Commit-by: Zehai;yuxin5;zhouxuan78;xutianlong1;royccc;hongyiliu111 Merged-by: cann-robot Description: feat(Operation): Add pypto.conv_backward_filter and its 2D implementation on A2/A3 Add pypto.conv_backward_filter interface to compute the gradient of convolution with respect to the weight tensor, and implement its 2D support spanning the frontend interface, backend operation implementation and MTE codegen Changes: - Add pypto.conv_backward_filter frontend interface with parameter validation - Implement ConvBackwardFilter 2D backend operation and codegen - Add UT/ST test cases for the 2D implementation See merge request: cann/pypto!6752 | 1 month ago | |
refactor(all): Remove trailing whitespace Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !2188 merge pre-commit into master refactor(all): Remove trailing whitespace Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Introduce pre-commit tools, and remove trailing white space with default plugin Related Issue: #1017 See merge request: cann/pypto!2188 | 7 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 | |
feat(operation): Add quant hif4 Co-authored-by: 杨志邈<yangzhimiao@huawei.com> # message auto-generated for no-merge-commit merge: !7229 merge master into master feat(operation): Add quant hif4 Created-by: yangzhimiao Commit-by: 杨志邈 Merged-by: cann-robot Description: 新增算子Quant Hif4。用于A6设备上BF16到Hif4的量化。支持Scale_alg为0/1,尾轴量化。 Related Issue: [#3684](https://gitcode.com/cann/pypto/issues/3684) See merge request: cann/pypto!7229 | 30 days ago | |
fix(machine): Size runtime outcast pool by max root outcast count Co-authored-by: hubowen<hubowen17@huawei.com> # message auto-generated for no-merge-commit merge: !6957 merge fix/outcast-pool-capacity into master fix(machine): Size runtime outcast pool by max root outcast count Created-by: hubowen Commit-by: hubowen Merged-by: cann-robot Description: 标题:fix(machine): Size runtime outcast pool by max root outcast count 问题描述 测试框架新增 WAW(一槽多写)组合能力后,新增用例 op_combo_vc_2c2v_waw_single 系列(case_28 等)稳定失败: ErrCode: F73001! Enum: CtrlErr::CTRL_FLOW_EXEC_FAILED. #ctrl.workspace.preflight: Root cannot fit in an empty DeviceTask, rootKey=0, func=vc_2c2v_waw_single_kernel_loop_idx_i_Unroll8_PATH0_hiddenfunc_root, reason=runtime-outcast-metadata. 根因分析 runtimeOutcastTensorPool 容量公式为 totalSlot × (depth+1) × parallelism,隐含假设“每个 slot 每代 device task 至多占用 1 个池项”(普通数据流下单 root 的 outcast 数 ≤ slot 数)。 WAW 形态打破该假设:同一 slot 被连续写多次,每次写都是一个独立 outcast 条目(中间值需各自跟踪地址/引用/释放),单 root 的 outcast 数可超过 totalSlot。实测本用例: - kernel totalSlot=5,depth=1 → 池容量 = 10 项 - Unroll8 root 有 9 个 outcast(5 个 slot 上共写 9 次),单 root 需求 9 > slot 数 5 - 预检失败时空闲仅 6(上一个 device task 正常在途持有 4 项)→ 6 < 9 → 空 DeviceTask 上放不下,F73001 即池容量对最坏单 root 需求只有 1 项余量,无法覆盖正常的在途重叠;定容公式未建模 WAW 形态。已用 10/9、10/10 前、10/12 上午三个历史构建二分确认非近期提交回归,系新用例暴露的既有设计缺口。 修复方案 - WorkspacePerRootFunctionDesc 新增 outcastNum,ProcessDevFunctionOutcasts 记录每个 root 的 outcast 条目数 - ApplyStitchDepthConfig 池容量改为 max(totalSlot, maxRootOutcastNum) × (depth+1) × parallelism:按最坏单 root 需求定界,保证最大 WAW root 可独立放入;(depth+1) 在途重叠代数语义不变 - 池字节成本仍经 CalcMetadataItemPoolMemSize 计入元数据预算(设置池容量 → ctrlflow cache Init → 元数据汇总的调用顺序已核实) See merge request: cann/pypto!6957 | 1 month ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 29 days ago | ||
| 6 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 7 months ago | ||
| 1 month ago | ||
| 29 days ago | ||
| 7 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 1 month ago | ||
| 7 months ago | ||
| 3 months ago | ||
| 30 days ago | ||
| 1 month ago |