| Files | Last commit | Last update |
|---|---|---|
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
feat(pypto): Add pypto.experimental.auto_mix_partition 0/1 config Co-authored-by: bytecode<dubingjia1@huawei.com> # message auto-generated for no-merge-commit merge: !6648 merge automixdocs into master feat(pypto): Add pypto.experimental.auto_mix_partition 0/1 config Created-by: bytecode Commit-by: bytecode Merged-by: cann-robot Description: feat(pypto): Add pypto.experimental.auto_mix_partition 0/1 config The level-based auto_mix_partition config (off/default/high strings and the N>100 custom op-limit) is removed from pypto.set_pass_options. The auto CV Mix merging switch of the ReduceCopyMerge pass is now configured solely via pypto.experimental.auto_mix_partition(0/1), defaulting to disabled (0). The C++ ReduceCopyMerge level mapping (MapAutoMixPartitionToLimits) is kept unchanged. Changes: - Add pypto.experimental.auto_mix_partition(value) accepting only 0/1, other values raise ValueError - Remove the auto_mix_partition parameter from pypto.set_pass_options and its read-back key from pypto.get_pass_options - Converge the tile_fwk_config default to 0 and tighten the schema range to 0~1 - Update the interface UT (test_config_options.py) and the set_pass_options API doc - Remove the sg_set_atomic_scope description from the set_pass_options doc Related Issues: #3431 See merge request: cann/pypto!6648 | 2 months ago | |
feat(platform): Add Platform config Co-authored-by: 2501_92924845<niulinkai@huawei.com> # message auto-generated for no-merge-commit merge: !6063 merge platformconfig into master feat(platform): Add Platform config Created-by: 2501_92924845 Commit-by: 2501_92924845 Merged-by: cann-robot Description: 背景: 原始的platform信息并沿用了机器层面命名。 本 PR 对平台配置域做概念规范化,统一到三个标准概念: 1. soc_series:原 short_soc_version(ini 键 Short_SoC_version),如 Ascend950; 2. soc_version:芯片分 bin(ini 键 SoC_version,每个 soc_version 一个 ini 文件),如 Ascend950PR_9589; 3. 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!6063 | 2 months ago | |
feat(ir): Support dump function attribute Co-authored-by: tsungl4<lidongsheng4@huawei.com> # message auto-generated for no-merge-commit merge: !6675 merge attr into master feat(ir): Support dump function attribute Created-by: tsungl4 Commit-by: tsungl4 Merged-by: cann-robot Description: Related Issue: #2559 See merge request: cann/pypto!6675 | 2 months ago | |
feat(pass): ooo consider VL padding, insert sync support cv mix mte case Co-authored-by: GBowen666<libowen58@huawei.com> # message auto-generated for no-merge-commit merge: !6293 merge master into master feat(pass): ooo consider VL padding, insert sync support cv mix mte case Created-by: GBowen666 Commit-by: GBowen666 Merged-by: cann-robot Description: Related Issue: [[Requirement|需求建议]:支持ooo调度考虑VL对齐地址分配问题,insert_sync支持aic/aiv物理同构核mte的event id分配](https://gitcode.com/cann/pypto/issues/3320) 1、feat(pass): ooo consider VL padding, insert sync support cv mix mte case See merge request: cann/pypto!6293 | 2 months ago | |
fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Co-authored-by: shi-dingkun<shidingkun1@huawei.com> # message auto-generated for no-merge-commit merge: !5865 merge fix/matmul-arch-and-format-constraint-check into master fix(operation): Add missing arch and format constraint checks for matmul/scaled_mm Created-by: shi-dingkun Commit-by: shi-dingkun Merged-by: cann-robot Description: 为 matmul/scaled_mm 补齐接口文档中缺失的业务约束检查以及文档针对多核切K功能的描述修正,并修正 FP4 UT。 ## 约束检查 | 约束 | 检查位置 | |---|---| | 输入→输出 dtype 组合表(基础/量化/反量化场景) | __validate_out_dtype | | A2/A3 不支持 DT_HF8 输入 | __validate_inputs | | DT_HF8 不支持 NZ 格式 | __validate_inputs | | A2/A3 不支持 trans_mode | __validate_trans_mode | | scale_a/scale_b 仅支持 ND 格式 | __validate_scaled_inputs | | matmul 拒绝 FP4 输入(仅 scaled_mm 支持) | __validate_matmul_fp4_input | ## FP4 UT 修正 test_fp4_packed_shape.py 重写为正规写法:独立 X/Y 矩阵,scaled_mm + scale tensors + DT_FP16 输出。 ## 测试 test_matmul_op.py 20/20 通过,test_fp4_packed_shape.py 1/1 通过。 Related Issues: #3213 See merge request: cann/pypto!5865 | 2 months ago | |
style(all): Fix ruff-check lint errors across the codebase Co-authored-by: junjieHuang<huangjunjie38@h-partners.com> # message auto-generated for no-merge-commit merge: !4934 merge style-python-format into master style(all): Fix ruff-check lint errors across the codebase Created-by: junjieHuang Commit-by: junjieHuang Merged-by: cann-robot Description: Fix ruff-check lint errors across the codebase See merge request: cann/pypto!4934 | 4 months ago | |
fix(pypto_pro): Upload for tile check Co-authored-by: liuyu<liuyu205@hisilicon.com> # message auto-generated for no-merge-commit merge: !6468 merge master_sub into master fix(pypto_pro): Upload for tile check Created-by: liuyu205 Commit-by: liuyu Merged-by: cann-robot Description: Upload for tile check See merge request: cann/pypto!6468 | 2 months ago | |
fix(tests): Delete unused simulator add test case Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5957 merge delete_ut into master fix(tests): Delete unused simulator add test case Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: 删除无用ut See merge request: cann/pypto!5957 | 2 months ago | |
feat(exported_custom_op): Add the operator attribute specification Co-authored-by: Nikita Larichev<nikita.larichev@h-partners.com> # message auto-generated for no-merge-commit merge: !6473 merge v3_04a_attr_spec into master feat(exported_custom_op): Add the operator attribute specification Created-by: Nikita17 Commit-by: Nikita Larichev Merged-by: cann-robot Description: Split out of https://gitcode.com/cann/pypto/merge_requests/5158 for reviewability. Carved out of what was previously part of the operator-declaration PR (#5602/ v3_05_declare_run) so the typed attribute contract can be reviewed on its own before the declaration surface that consumes it lands. AttrSpec is the single ordered source of truth every downstream emitter (the typed ONNX node attribute, the GE REG_OP line, the onnx-plugin ParseParam block, and the executor ExtractAttrs positional index) will key off in later PRs in this series. **API surface map for this whole series — every def with its signature, introducing PR and callers:** https://claude.ai/code/artifact/a42e70ca-5cf9-4a67-8eb3-b7d3c8e17f1a Changes: - Add AttrSpec (common/attr_spec.py): a frozen dataclass over name/type/default for the four supported attribute kinds (Int, Float, String, ListInt), validating the name against an identifier pattern and each default against what its eventual C++ emission can carry losslessly (int64 range for Int, finite values for Float, quote/backslash/newline-free text for String, a homogeneous int list for ListInt), plus to_json_dict() for serializing into a node's op_export_params - Re-export AttrSpec from the package __init__.py - Add test_attr_spec_validation.py: construction and round-trip serialization, the default=None => required rule, and every rejection path (bad name, wrong type, out-of-range/non-finite/unsafe defaults) Related Issues: [#2869](https://gitcode.com/cann/pypto/issues/2869), [#5158](https://gitcode.com/cann/pypto/merge_requests/5158) See merge request: cann/pypto!6473 | 2 months ago | |
fix(build): Flush gcov data for pytest-forked subprocess coverage Co-authored-by: chengding888<chengding1@hisilicon.com> # message auto-generated for no-merge-commit merge: !6148 merge master into master fix(build): Flush gcov data for pytest-forked subprocess coverage Created-by: chengding888 Commit-by: chengding888 Merged-by: cann-robot Description: ## 背景 Python UT 通过 --forked(pytest-forked)并行执行用例,子进程以 os._exit() 退出,会跳过 atexit 钩子,导致 gcov 的 __gcov_exit 不被调用、.gcda 覆盖率数据不落盘。因此 --gcov 无法统计到由 Python UT 触发的 C++ 覆盖率(issue #2705)。 ## 解决方案 1. **python/tests/ut/conftest.py**:新增 pytest_runtest_teardown 钩子,当环境变量 PYPTO_GCOV_FLUSH=1 时手动调用 __gcov_dump(),把内存中的计数器写入 .gcda;并补充 duration_estimate 装饰器。 2. **build_ci.py**:--gcov 时注入 PYPTO_GCOV_FLUSH=1。 3. **cmake/intf.cmake**:gcov 模式追加链接选项 -Wl,--export-dynamic,-u,__gcov_dump,--whole-archive,-lgcov,--no-whole-archive。仅加 -u,__gcov_dump 时 _gcov_dump.o 不会被 lgcov.a 拉入,__gcov_dump 保持未定义,ctypes.CDLL(None) 找不到该符号,必须用 --whole-archive 强制拉入。 4. **cmake/scripts/gen_coverage.py**:lcov >= 2.0 时追加 --ignore-errors inconsistent,将 lcov 2.3.1 对 pybind11.cpp 的 mismatched end line 由 ERROR 降级为 WARNING,避免覆盖率生成失败。 5. **tools/scripts/pre_commit_check.sh**: - 修正覆盖率开关(--py_cov → --gcov)、clang 失败退出码、GTEST_FILTER 保存/恢复、覆盖率标签等; - 移除本地增量覆盖率门禁:本地 gen_coverage.py --increment 与 CI 的 get_ai_inc_cov.py(addlcov) 是两套独立实现,增量覆盖率无法保证与 CI 一致,门禁统一由 CI 兜底。 ## 验证 - bash tools/scripts/pre_commit_check.sh --full 全部通过(gnu / clang+ASan / Python / costmodel 仿真,耗时约 4779s)。 - 确认 Python UT 触发场景下 C++ 覆盖率数据(.gcda)可正常落盘并被 --gcov 统计。 Related Issue: #2705 See merge request: cann/pypto!6148 | 2 months ago | |
fix(machine): fix log quality issues in machine module. Co-authored-by: chai-hw<chaizhengtong@huawei.com> # message auto-generated for no-merge-commit merge: !5679 merge pyptolog_fix into master fix(machine): fix log quality issues in machine module. Created-by: chai-hw Commit-by: chai-hw Merged-by: cann-robot Description: PyPTO machine 模块日志整改 See merge request: cann/pypto!5679 | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 4 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago |