| Files | Last commit | Last update |
|---|---|---|
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
test(machine): Supplement machine UT test cases. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !4935 merge machine_ut into master test(machine): Supplement machine UT test cases. Created-by: chai-hw Commit-by: chai-hw 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!4935 | 4 months ago | |
fix(machine): Detect intra-loop write overlap for single-root cell-match WAW Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !5770 merge cell-resolve into master fix(machine): Detect intra-loop write overlap for single-root cell-match WAW Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## 1. Background(背景信息) 当前 kernel 输入 tensor 的写后写依赖建立过程,单 root、跨迭代写同一 assemble 区域时,无法建立写后写依赖,导致精度异常。 为了解决场景精度异常问题,新增 PASS 在 IR 层进行写后写区域重叠校验:相对当前循环变量,相邻迭代写窗可分,并进行非重叠标记,用于machine部分的写后写依赖判定依据。 ## 2. 总体流程 1. 在create_function之后新增了infer_multi_iter_overlap_pass,用于检测loop 迭代间的写区域重叠; 2. 对于检测区域不重叠的打上标记,使用rebuildable attribute挂载在function上; 3. 获取function的assemble数量,数量>=2的保守视为存在写后写,只考虑assemble数量为1的场景; 4. 对于整体的function,识别assemble所在循环层的循环变量与步长,进行区域重叠检测,不存在循环变量的视为固定区域写,存在重叠;存在循环变量的进行重叠检测,用循环变量i+step与i的offset之差与assemble的tensor shape做比较。 ## 3. 验证场景一览 | # | scene | assemble offset(示意) | 期望 Mark / WAW | |---|-------|-------------------------|-----------------| | 1 | assemble_disjoint | [i*tile, 0] | Mark / 无 WAW | | 2 | assemble_overlap | [i*(tile//2), 0] | 不 Mark / 有 WAW | | 3 | nested_disjoint | [i*tile, j*tile_n](innermost=j 可分) | Mark / 无 WAW | | 4 | nested_overlap | [i*tile, j*(tile_n//2)](innermost=j 半窗重叠) | 不 Mark / 有 WAW | | 5 | fixed_offset | [0, 0](当前变量不在 offset) | 不 Mark / 有 WAW | | 6 | same_idx_diff_step | sibling:左半窗重叠 + 右 step=2 可分 | 同 raw 多 assemble → 不 Mark | | 7 | nested_inner_immediate_offset | 嵌套:[i*tile, 0],innermost=j 不在 offset | 不 Mark / 有 WAW | ## 4. PR限制约束(#3401 ) 1. 当前实现逻辑只考虑了最内层循环的重叠判定,在循环嵌套场景下,外层循环的影响没有考虑,存在局限。 2. 当前实现逻辑没有考虑循环内部创建tensor的情况,内部创建的tensor会自动根据迭代次数分配不同的地址区域,所以一定不重叠。 3. 更多的泛化性场景需要验证与补充。 See merge request: cann/pypto!5770 | 2 months ago | |
fix(machine): Add control flow encode Co-authored-by: LordOfMysteries<duhongxiang@huawei.com> Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !6666 merge br_test into master fix(machine): Add control flow encode Created-by: wan_jianfen Commit-by: wan_jianfen;LordOfMysteries 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!6666 | 2 months ago | |
fix(machine): Ensure cross-loop atomic_add determinism via ordered WAW Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !5296 merge assemble-op into master fix(machine): Ensure cross-loop atomic_add determinism via ordered WAW Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ## Summary 修复跨 loop atomic_add 在 K 分片并行累加时的非确定性:当 compute_determinism_level >= 1 时,machine encode 将原子写退化为有序 NORMAL_WRITE,并通过 stitch **WAW** 建立串行依赖。 ## 问题 - K 轴分片并行时,多个 atomic_add 通过硬件 ATOMIC_WRITE 并发累加到同一 buffer。 - 浮点加法不满足结合律,写入到达顺序不确定 → 多次运行结果不一致。 ## 方案 读取全局配置 compute_determinism_level(由 JIT 入口从 torch_npu.set_deterministic_level 同步,level ≥ 1 即开启)。 **Encode 写类型** - 确定性关:isAtomic() → ATOMIC_WRITE(与原行为一致)。 - 确定性开:isAtomic() → NORMAL_WRITE,并在 outcast tensor 上 SetAttr("NORMAL"),退化为一般 assemble 写场景。 **Stitch WAW** - rootFuncOk 为真:沿用既有逻辑,hasNormalAttr → STITCH_CTRL_WAW(encode 补标后可命中)。 - 单 root 的 kernel input-assemble(rootFuncOk 为假):确定性开且 OutcastHasAtomicProducer(扫 Call 的 isAtomic())→ STITCH_CTRL_WAW。 See merge request: cann/pypto!5296 | 3 months ago | |
fix(machine): Dedup duplicate outcast consumer READs via last-wins Co-authored-by: songyangyang18<songyangyang18@huawei.com> # message auto-generated for no-merge-commit merge: !5656 merge cell-fix into master fix(machine): Dedup duplicate outcast consumer READs via last-wins Created-by: songyangyang18 Commit-by: songyangyang18 Merged-by: cann-robot Description: ### READ 后去重(last-wins) **背景**:同一 outcast 上多 producer 展开后,同一 consumer Call 可能对同一 tensor 注册多次 READ;上游按 operationIdx 去重会丢掉 W→R→W→R 交错形态。 **做法**: - encode 分析 outcast consumer 时允许同一 operationIdx 多次 READ 入表,记录 lastReadPos。 - 若存在重复 READ,调用 RebuildOutcastUseListByLastReadPos:**同一 operationIdx 只保留最后一次 READ**(last-wins),WRITE 条目全部保留。 - 保证 producerConsumerList 能表达「写—读—写—读」交错,同时去掉对 cell-match 无意义的早期重复读。 See merge request: cann/pypto!5656 | 3 months ago | |
test(machine): Supplement machine UT test cases_2. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !4987 merge ut_2 into master test(machine): Supplement machine UT test cases_2. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut 补充 See merge request: cann/pypto!4987 | 4 months ago | |
test(machine): Supplement machine UT test cases_11. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5305 merge ut_12 into master test(machine): Supplement machine UT test cases_11. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut覆盖 See merge request: cann/pypto!5305 | 3 months ago | |
fix(machine): Validate SetDebugEnable return value across call chain Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5788 merge fix-validate-perf-retval into master fix(machine): Validate SetDebugEnable return value across call chain Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: fix(machine): Validate SetDebugEnable return value across call chain DevicePerf::SetDebugEnable invokes RuntimeMemcpyDirect three times (H2D perf data, D2H devDfxArg, H2D devDfxArg) without checking the return value. When a copy fails, execution continues with stale data, e.g. setting profLevel and writing it back to the device based on a failed D2H read. This patch propagates the return code through the whole call chain (SetDebugEnable -> SetDevPerfAddr -> LaunchKernel / LaunchBundleKernelOnce) so that any copy failure aborts the subsequent logic immediately. Changes: - Change DevicePerf::SetDebugEnable / InitPerfData / SetDevPerfAddr return type from void to int and capture RuntimeMemcpyDirect results - Log RtErr::RT_MEMCPY_FAILED with context (core id, kind, size, ptrs) and return early on copy failure - Move perf data lazy-init (g_isInitPerfData) into SetDebugEnable and drop the redundant InitPerfData() call from InitAndStartDumpThread - Guard LaunchKernel with MACHINE_ASSERT on SetDevPerfAddr result and early-return in LaunchBundleKernelOnce on non-RT_SUCCESS - Guard InitAicorePrint and aicore-print path behind ENABLE_AICORE_PRINT Verification: 3 production TUs and 3 affected test TUs compiled incrementally. (A full cmake build fails due to a stale build cache referencing the removed tile_fwk_operator target since commit 1dab31e13; re-running cmake configuration fixes it and is unrelated to this change.) Related Issues: #3168 See merge request: cann/pypto!5788 | 3 months ago | |
fix(machine): Validate SetDebugEnable return value across call chain Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5788 merge fix-validate-perf-retval into master fix(machine): Validate SetDebugEnable return value across call chain Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: fix(machine): Validate SetDebugEnable return value across call chain DevicePerf::SetDebugEnable invokes RuntimeMemcpyDirect three times (H2D perf data, D2H devDfxArg, H2D devDfxArg) without checking the return value. When a copy fails, execution continues with stale data, e.g. setting profLevel and writing it back to the device based on a failed D2H read. This patch propagates the return code through the whole call chain (SetDebugEnable -> SetDevPerfAddr -> LaunchKernel / LaunchBundleKernelOnce) so that any copy failure aborts the subsequent logic immediately. Changes: - Change DevicePerf::SetDebugEnable / InitPerfData / SetDevPerfAddr return type from void to int and capture RuntimeMemcpyDirect results - Log RtErr::RT_MEMCPY_FAILED with context (core id, kind, size, ptrs) and return early on copy failure - Move perf data lazy-init (g_isInitPerfData) into SetDebugEnable and drop the redundant InitPerfData() call from InitAndStartDumpThread - Guard LaunchKernel with MACHINE_ASSERT on SetDevPerfAddr result and early-return in LaunchBundleKernelOnce on non-RT_SUCCESS - Guard InitAicorePrint and aicore-print path behind ENABLE_AICORE_PRINT Verification: 3 production TUs and 3 affected test TUs compiled incrementally. (A full cmake build fails due to a stale build cache referencing the removed tile_fwk_operator target since commit 1dab31e13; re-running cmake configuration fixes it and is unrelated to this change.) Related Issues: #3168 See merge request: cann/pypto!5788 | 3 months ago | |
test(machine): Supplement machine UT test cases_4. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5087 merge ut_5 into master test(machine): Supplement machine UT test cases_4. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut覆盖补充 See merge request: cann/pypto!5087 | 4 months ago | |
refactor(machine): Remove unused DevicePerf::RunPrepare Co-authored-by: Jie Yin<yinjie27@huawei.com> # message auto-generated for no-merge-commit merge: !6924 merge pgo-framework into master refactor(machine): Remove unused DevicePerf::RunPrepare Created-by: yinjie27_ Commit-by: Jie Yin Merged-by: cann-robot Description: DevicePerf::RunPrepare has no production caller: its only call site was removed together with the legacy DeviceRunner launch path in 34770d5bd ("Unify C++ launch path to use KernelBinary and LaunchKernel"). The per-launch refresh of the perf data pointers is already handled by DeviceLauncher::SetDevPerfAddr -> DevicePerf::SetDebugEnable, which runs on every launch (device_launcher.cpp), so RunPrepare is dead code. Changes: - Remove the unused DevicePerf::RunPrepare definition and declaration - Remove the DevicePerfTest.RunPrepare_DebugMode unit test - Remove the include that became unused after the deletion Verification: - device_perf.cpp syntax-checked with the project's own compile flags (build/compile_commands.json), UT file checked with the same flags + gtest - pre-commit checks passed on commit See merge request: cann/pypto!6924 | 1 month ago | |
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
test(machine): Supplement machine UT test cases_11. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5305 merge ut_12 into master test(machine): Supplement machine UT test cases_11. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut覆盖 See merge request: cann/pypto!5305 | 3 months ago | |
feat(machine): Support host ctrlflow cache by jit Co-authored-by: qq_52905393<liuzhen180@huawei.com> # message auto-generated for no-merge-commit merge: !5741 merge dev-host-ctrl-jit into master feat(machine): Support host ctrlflow cache by jit Created-by: qq_52905393 Commit-by: qq_52905393 Merged-by: cann-robot Description: 1、支持通过 jit ready_on_host_tensors 配置 npu_name: cpu_name 传入配对关系,算子 kernel 传入值依赖 tensor 对应的 cpu tensor 2、支持传入值依赖 tensor 场景下在 host 侧做 controlflow cache See merge request: cann/pypto!5741 | 2 months ago | |
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
feat(machine): Change aicpu kernel launch method Co-authored-by: wan_jianfen<wanjianfen@hisilicon.com> # message auto-generated for no-merge-commit merge: !5045 merge br_aicpuKernelLaunch into master feat(machine): Change aicpu kernel launch method Created-by: wan_jianfen Commit-by: wan_jianfen Merged-by: cann-robot Description: 改变kernel_launch 接口,更换成acl 接口 See merge request: cann/pypto!5045 | 3 months ago | |
test(machine): Supplement machine UT test cases_12. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5361 merge ut_12 into master test(machine): Supplement machine UT test cases_12. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut补充 See merge request: cann/pypto!5361 | 3 months ago | |
feat(pypto_pro): auto block_dim for direct calls and explicit over-budget rejection Co-authored-by: liulufang_gitcode<liulufang1@hisilicon.com> # message auto-generated for no-merge-commit merge: !6328 merge llf into master feat(pypto_pro): auto block_dim for direct calls and explicit over-budget rejection Created-by: liulufang_gitcode Commit-by: liulufang_gitcode Merged-by: cann-robot Description: 1、jit运行时的block_dim如果不填,从默认使用的是1改为使用当前device的最大可用值 2、对当前用户传递的block_dim进行校验,如果大于device的最大可用值,则直接报错 See merge request: cann/pypto!6328 | 2 months ago | |
test(machine): Supplement machine UT test cases_2. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !4987 merge ut_2 into master test(machine): Supplement machine UT test cases_2. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: machine ut 补充 See merge request: cann/pypto!4987 | 4 months ago | |
feat(indexing): Support A5 SIMT gather and index put Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !5404 merge feat/a5-simt-mixed into master feat(indexing): Support A5 SIMT gather and index put Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: gather indexput 支持的simt 实现,在离散场景下提升性能 当 Gather 的 source 位于 GM、indices 位于 UB 时,A5 Codegen 会选择 SIMT MGATHER 实现: 1. 使用 SIMD 批量计算 Gather 的元素偏移。 2. 使用 SIMT MGATHER 根据偏移直接从 GM source 读取数据。 3. source 位于 UB 时继续使用原有实现。 4. int64 indices 暂不使用 SIMT,回退到原有 Scalar 实现。 同时补充了 SIMT Kernel 的端到端识别与下发机制: 1. Pass 识别需要 SIMT 的 Gather,并设置 requiresSimt 属性。 2. 将 requiresSimt 信息传递到 Device Program 和编译流程。 3. 为包含 SIMT 的 A5 Kernel 生成相应的 ELF metadata。 4. Runtime 根据 Kernel 是否包含 SIMT,选择对应的 UB 配置。 5. SIMT Kernel 配置 216 KB 动态 UB,并为 DCache 预留 32 KB。 6. 纯 SIMD Kernel 保持原有 Runtime 下发方式和 UB 配置。 此外,完善了 GM GatherElement 在内存类型推导、动态参数注册、动态 valid shape 处理和 OoO 调度中的支持。 Related Issue: #3162 ``` 更多描述信息见:[Commit Message 规范](../docs/zh/contribute/pull-request.md#commit-message) See merge request: cann/pypto!5404 | 2 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 4 months ago | ||
| 1 month ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 3 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 2 months ago |