| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(operation): Bound FillPad padding to tile columns Co-authored-by: bynshard<zhangbingshuai@huawei.com> # message auto-generated for no-merge-commit merge: !6513 merge fix-fillpad-9.2.0 into 9.2.0 fix(operation): Bound FillPad padding to tile columns Created-by: bynshard Commit-by: bynshard Merged-by: cann-robot Description: FillPad 对共享 UB 缓冲区中的列分块处理错误,导致有效数据被清零,并可能越过目标缓冲区边界。 concat 结果的形状为 [16,128],vector tile 配置为 [16,80],因此 FillPad 被拆分为前 80 列和后 48 列两个分块。两个分块保留父缓冲区的物理行步长 128。原 TFillPad 封装直接使用 layout 中的静态宽度 128 构造 PTO Tile。底层 TFILLPAD_EXPAND 会将输入有效列之外的区域补到该静态宽度,而不是限制在当前分块的 80/48 列范围内。 Related Issue: https://gitcode.com/cann/pypto/issues/3387 See merge request: cann/pypto!6513 | 2 个月前 | |
fix(pass): Fix nested-loop InferMultiIterOverlap and refine local-tensor create detection Include dump function attribute support for rebuildable attrs. Co-authored-by: Cursor <cursoragent@cursor.com> | 2 个月前 | |
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: !6438 merge 920 into 9.2.0 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限制约束 1. 当前实现逻辑只考虑了最内层循环的重叠判定,在循环嵌套场景下,外层循环的影响没有考虑,存在局限。 2. 当前实现逻辑没有考虑循环内部创建tensor的情况,内部创建的tensor会自动根据迭代次数分配不同的地址区域,所以一定不重叠。 3. 更多的泛化性场景需要验证与补充。 See merge request: cann/pypto!6438 | 2 个月前 | |
fix(pass): Fold common dynamic base of split views into reshape copy-in Co-authored-by: hwwangmingjun<wangmingjun13@huawei.com> # message auto-generated for no-merge-commit merge: !6571 merge fix/validshape-dynamic-offset-92-v2 into 9.2.0 fix(pass): Fold common dynamic base of split views into reshape copy-in Created-by: hwwangmingjun Commit-by: hwwangmingjun Merged-by: cann-robot Description: 修复动态 Reshape 场景下 View Offset 折叠错误导致的精度问题 ## 背景 在 ValidShape 动态场景中,动态非对齐 Reshape 会被替换为: RESHAPE_COPY_OUT -> workspace -> RESHAPE_COPY_IN -> 多个 View 当多个 View 由 Split 生成,并且同时包含动态起始地址和静态 tile 偏移时,原有逻辑无法正确识别共同动态基址,导致 RESHAPE_COPY_IN 使用错误的零偏移搬运数据,最终产生精度错误。 ## 问题根因 多个 View 的实际地址形式为: 共同动态基址 + 各自静态 tile 偏移 例如: dynamic_base + [ 0, 0] dynamic_base + [ 0, 32] dynamic_base + [16, 0] dynamic_base + [16, 32] 原逻辑直接比较各 View 的 offset,将: dynamic_base dynamic_base + 16 判定为不同地址,因此放弃 offset 折叠,使 RESHAPE_COPY_IN 保持: from offset = [0, 0] 在后续动态循环中,数据从错误的 GM 地址搬运,导致精度失败。 ## 修改内容 优化 RemoveUnalignedReshape 的 View Offset 折叠逻辑: - 识别多个 View 共享的动态基址; - 计算 View 覆盖的联合搬运区域; - 将动态基址下沉到 RESHAPE_COPY_IN; - 保留各 View 的局部静态 tile 偏移; - 同步更新 copy-in 的 shape 和动态 valid shape。 处理后: RESHAPE_COPY_IN offset = dynamic_base View offset: [ 0, 0] [ 0, 32] [16, 0] [16, 32] RESHAPE_COPY_IN 负责从正确的动态地址搬入完整数据块,各 View 负责选择对应的 tile。 ## 影响范围 该修改适用于以下通用模式: 多个 View 共享动态基址,同时具有不同的静态 tile 偏移 如果无法提取共同动态基址、动态末维 offset 不可表达,或联合区域越界,则保持原图,不执行折叠。 ## 测试验证 新增 UT 覆盖二维 tile View 的共同动态基址折叠场景: framework/tests/ut/passes/src/test_remove_unaligned_reshape_op.cpp 验证以下用例全部通过: 109、111、112、123、130、149、 152、163、165、173、180、183 其中 case 111 的 RESHAPE_COPY_IN 已从错误的零偏移改为使用动态行起始地址,精度恢复正常。 See merge request: cann/pypto!6571 | 2 个月前 | |
feat(platform): Modify Platform config Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !6227 merge sfplatform into 9.2.0 feat(platform): Modify Platform config Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: 背景: 原始的platform信息并沿用了机器层面命名。 本 PR 对平台配置域做概念规范化,统一到三个标准概念: soc_series:原 short_soc_version(ini 键 Short_SoC_version),如 Ascend950; soc_version:芯片分 bin(ini 键 SoC_version,每个 soc_version 一个 ini 文件),如 Ascend950PR_9589; NPU_ARCH:核架构名称(ini 键 NpuArch),如 3510/2201。 A2/A3/A5 属于整机(chip + host CPU/网卡/机箱)层面的机器概念,不再用于平台配置选择。 Changes: platform_config 精简为实际交付的 13 个 soc_version ini(69 -> 13),规格与 CANN 9.2.0 包内文件一致;Ascend910_9363、Ascend950DT_9581X 按交付需求保留 DPlatform 枚举适配真实 soc_version,不再自定义枚举值:删除与实际芯片不符的 ASCEND_950DT_9579/ASCEND_950PR_9582(对应真实 bin 为 Ascend950DT_9572/Ascend950PR_9589), 补充 ASCEND_910_9363/ASCEND_950DT_9581X platform.h 新增 DPlatformToNPUArch(),统一 soc_version -> NPU_ARCH 映射 (910B 系列 -> 2201,950 系列 -> 3510,Kirin -> 3113/3003) GetCyclesForPass 仿真器选择改为按 NPU_ARCH 判断(3510 -> "A5",其余 -> "A2A3"), 不再按 A2A3/A5 机器名前缀匹配;A2A3/A5 仅作为 cost model 内部实现类型名保留 默认 device_platform 统一为标准格式 Ascend910B2(config_manager.h / tile_fwk_config.json) CMakeLists 安装清单与交付 ini 清单保持一致 UT 同步更新:枚举映射、legacy 格式兼容、NPU_ARCH 映射、ini 规格加载用例, 新增 Ascend910_9363 / Ascend950DT_9581X 用例 兼容性: 旧格式 device_platform(如 "ASCEND_910B2")仍可识别,自动归一化为标准 soc_version 并打印告警; 其中 ASCEND_950DT_9579 -> Ascend950DT_9572、ASCEND_950PR_9582 -> Ascend950PR_9589, 与其原先实际加载的 ini 规格保持一致 ASCEND_910C4 为无效值,回落默认 Ascend910B2(与原行为一致) Tests: TestDevicePlatformConfig(16 例)、TestConfigManager、CostModelTest 相关用例全部通过; See merge request: cann/pypto!6227 | 2 个月前 | |
refactor(operator): Remove tile_fwk_operator library and associated tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5704 merge delete_test into master refactor(operator): Remove tile_fwk_operator library and associated tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 整改库上代码,删除 framework/src/operator python/tests/st/operator/glm python/tests/st/operator/test_page_attention.py 以及相关涉及文件 See merge request: cann/pypto!5704 | 3 个月前 | |
refactor(operator): Remove tile_fwk_operator library and associated tests. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5704 merge delete_test into master refactor(operator): Remove tile_fwk_operator library and associated tests. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 整改库上代码,删除 framework/src/operator python/tests/st/operator/glm python/tests/st/operator/test_page_attention.py 以及相关涉及文件 See merge request: cann/pypto!5704 | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |