| 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 | |
fix(tensor): Calculate data size from data type bits Co-authored-by: zhaojunhan<zhaojunhan1@huawei.com> # message auto-generated for no-merge-commit merge: !5044 merge fix-tensor-data-size-bits into master fix(tensor): Calculate data size from data type bits Created-by: zhaojunhan Commit-by: zhaojunhan Merged-by: cann-robot Description: fix(tensor): Calculate packed tensor data size by bits 新增 DataSizeOf,统一根据元素数量和数据类型的 bit 位宽计算实际存储大小: 将 LogicalTensor、RawTensor、DeviceTensor 及 workspace 相关计算统一切换到 DataSizeOf,避免使用 BytesOf 时将 4-bit 元素按 1 byte 计算。 See merge request: cann/pypto!5044 | 4 months 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 | |
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 | 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): 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 | |
fix(pypto_pro): add Scaling and Bias capacity mappings Co-authored-by: fa<yangzf993@163.com> # message auto-generated for no-merge-commit merge: !6915 merge fixdocs into master fix(pypto_pro): add Scaling and Bias capacity mappings Created-by: fafafafafa Commit-by: fa 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!6915 | 1 month 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(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_input and its 2D implementation on A2/A3 Co-authored-by: hongyiliu111<liuhongyi1@huawei.com> Co-authored-by: xutianlong1<xutianlong1@huawei.com> Co-authored-by: wangshenhao<wangshenhao1@huawei.com> # message auto-generated for no-merge-commit merge: !5528 merge dev into master feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Created-by: hongyiliu111 Commit-by: wangshenhao;hongyiliu111;xutianlong1 Merged-by: cann-robot Description: feat(Operation): Add pypto.conv_backward_input and its 2D implementation on A2/A3 Add pypto.conv_backward_input interface to compute the gradient of convolution with respect to the input tensor, and implement its 2D support spanning the frontend interface, backend operation implementation and MTE codegen Changes: - Add pypto.conv_backward_input frontend interface with parameter validation - Implement ConvBackwardInput 2D backend operation and codegen - Add UT/ST test cases for the 2D implementation See merge request: cann/pypto!5528 | 3 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(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): support A5 adaptive in-place overwrite Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !6174 merge codex/scatter-upstream-master into master feat(operation): support A5 adaptive in-place overwrite Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: scatter 算子 现在阶段使用 标量来实现,A5 有了 simt 能力,可以提高效率。 同时,部分场景中,在ub 中使用 Tscatter 性能更有优势 。 我们相当于支持了 scatter 自适应的 ub 和 gm,并且在gm 场景中使用 simt 来提高性能。 单算子场景中,性能平均提升 4~5,在ub 场景中无劣化。 Related Issue: https://gitcode.com/cann/pypto/issues/3470 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!6174 | 2 months ago | |
fix(machine): Optimize Assemble outcast workspace Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !6682 merge bound into master fix(machine): Optimize Assemble outcast workspace Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 背景 原先 Assemble 工作区预算按整图 NeedAlloc Assemble 总数来算,再乘上 stitch 深度。多 loop、多 root 时 Assemble 往往分布不均:有的 root 写多个 Assemble,有的只写一个,有的只读。用全局总数去乘深度,容易把 InnerTemporal 池估大。 实际运行里 Submit 会对 Assemble 做回收,同一深度上真正同时占用的,更接近「单个 root 上 NeedAlloc Assemble 的峰值」,而不是整图加总。 ## 方法 Collect 每个 encode root 时,用该 root 已有的 Assemble slot 列表(encode 阶段写入的 redaccAssembleSlotList)与全局 NeedAlloc 集合求交,得到这个 root 上真正需要分配的 Assemble 个数,再取所有 root 的最大值,记为 maxRootAssembleOutcastSlot。 公式变化(E 为 Exclusive 槽位数,A 为整图 NeedAlloc Assemble 数,A_max 为各 root 峰值,k 为 stitch 深度): 改前: - Boundary = (E_total + A_total) × 2 - InnerTemporal = A_rootmax × k × 2 改后: - Boundary = E_total × 2 - InnerTemporal = A_rootmax × k + A_total ## 结果 当 A_max 小于 A 时,InnerTemporal 相对旧公式会减小,减轻工作区高估。 单测覆盖典型场景:第一个 loop 写两个 Assemble,第二个写一个,第三个只读。此时 A = 3,A_max = 2,k = 8,改后 InnerTemporal = 2×8+3 = 19。 See merge request: cann/pypto!6682 | 1 month ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 7 months ago | ||
| 7 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 4 months ago | ||
| 7 months ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 7 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 1 month ago |