pypto:

Branch24Tags0
FilesLast commitLast update
feat(build): Add task issue template Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !995 merge ver into master feat(build): Add task issue template Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Add task issue template See merge request: cann/pypto!9953 months ago
refactor(build): Optimize the execution script location for use cases to extend support for pytest Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1084 merge master into master refactor(build): Optimize the execution script location for use cases to extend support for pytest Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: refactor(build): Optimize the execution script location for use cases to extend support for pytest See merge request: cann/pypto!10843 months ago
docs(machine): Update docker &APIdocuments Co-authored-by: duanhaotian<duanhaotian@huawei.com> # message auto-generated for no-merge-commit merge: !853 merge hardy_duan into master docs(machine): Update docker &APIdocuments Created-by: duanhaotian Commit-by: duanhaotian Merged-by: cann-robot Description: 更新docker 基础镜像版本到最新,添加pto-isa包及其他依赖,适配最新pypto See merge request: cann/pypto!8533 months ago
fix(operation): Optimize docs of operation. Co-authored-by: gguuaanngg<zhangguangjun2@huawei.com> # message auto-generated for no-merge-commit merge: !1110 merge master into master fix(operation): Optimize docs of operation. Created-by: gguuaanngg Commit-by: gguuaanngg Merged-by: cann-robot Description: 1、调整资料TileShape设置章节的结构 2、修复资料中中英文标点符号的问题 See merge request: cann/pypto!11103 months ago
fix(examples): Fix elementwise_ops and enable ffn_module CI test Co-authored-by: chenshengxin<chenshengxin@huawei.com> # message auto-generated for no-merge-commit merge: !1049 merge examples/fix-example-260212 into master fix(examples): Fix elementwise_ops and enable ffn_module CI test Created-by: shengxinchen Commit-by: chenshengxin Merged-by: cann-robot Description: ## 描述 本次 PR 对示例用例进行了修复与维护,主要包括: * 修复 elementwise_ops.py 中导致运行失败的问题,使该用例可正常执行; * 去除 ffn_module.py 中的 skip 标记,将该用例纳入 CI 看护范围; ## 测试 * 本地运行 elementwise_ops.py,验证修复后可正常执行; * 本地运行 ffn_module.py,确认去除 skip 标记后用例可正常通过; ## 文档更新 无需更新外部文档。 ## 类型标签 - [x] Bug 修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!10493 months ago
fix(machine): Fix prof open aicpu per data not complete 3 months ago
fix(tests): Change distribution method Co-authored-by: yyyfff<yefan29@huawei.com> # message auto-generated for no-merge-commit merge: !1017 merge feat/test into master fix(tests): Change distribution method Created-by: yyyfff Commit-by: yyyfff Merged-by: cann-robot Description: Modify ut test to new front See merge request: cann/pypto!10173 months ago
fix(machine): Fix prof open aicpu per data not complete 3 months ago
feat(interpreter): Supports dumped data parsing and comparison Co-authored-by: zhuqingbo<zhuqingbo@huawei.com> # message auto-generated for no-merge-commit merge: !1086 merge master into master feat(interpreter): Supports dumped data parsing and comparison Created-by: gcw_zcOFYzUr Commit-by: zhuqingbo Merged-by: cann-robot Description: 1.支持对上板dump数据的解析和比对 2.schema中参数描述修改 See merge request: cann/pypto!10863 months ago
Initial commit 5 months ago
refactor(examples): Move /example/models to /models directory Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !674 merge master into master refactor(examples): Move /example/models to /models directory Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: refactor(examples): Move /example/models to /models directory See merge request: cann/pypto!6744 months ago
feat(build): Extend test case executor functionality Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1018 merge master into master feat(build): Extend test case executor functionality Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: 1. Add .arts/ directory to .gitignore to ignore WebIDE default configuration path; 2. Add/complete comments in build_ci.py and setup.py; 3. Optimize parallel execution control script to facilitate future support for Pytest scenarios. See merge request: cann/pypto!10183 months ago
feat(machine): Add tile_fwk_utils and pypto host log Co-authored-by: arthur_morgan_hw<lipeijie@huawei.com> # message auto-generated for no-merge-commit merge: !7 merge br_machine into master feat(machine): Add tile_fwk_utils and pypto host log Created-by: arthur_morgan_hw Commit-by: arthur_morgan_hw Merged-by: cann-robot Description: ## 描述 1、新增tile_fwk_utils动态库,以后作为所有组件的公共库 2、tile_fwk_utils中新增host_log模块用于host日志的打印,同时支持dlog和内置log打印,使用策略如下 - host侧有CANN包编译、有CANN包执行,使用dlog - host侧有CANN包编译、无CANN包执行,使用内置log - host侧无CANN包编译、无CANN包执行,使用内置log PS:当前在dlog侧新增了PYPTO的moduleId,考虑到社区的CANN未更新,当前的策略临时调整为全部使用内置log进行打印。 后期社区CANN包更新之后,在按照上述策略重新调整 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!73 months ago
【Update】ReadMe等内容刷新 Co-authored-by: jason_yuan_ye<yuanye17@huawei.com> # message auto-generated for no-merge-commit merge: !3 merge master into master 【Update】ReadMe等内容刷新 Created-by: jason_yuan_ye Commit-by: jason_yuan_ye Merged-by: cann-robot Description: Update: 1. 更新ReadMe内容 2. 更新相关examples下内容说明 See merge request: cann/pypto!35 months ago
Initial commit 5 months ago
feat(machine): Add tile_fwk_utils and pypto host log Co-authored-by: arthur_morgan_hw<lipeijie@huawei.com> # message auto-generated for no-merge-commit merge: !7 merge br_machine into master feat(machine): Add tile_fwk_utils and pypto host log Created-by: arthur_morgan_hw Commit-by: arthur_morgan_hw Merged-by: cann-robot Description: ## 描述 1、新增tile_fwk_utils动态库,以后作为所有组件的公共库 2、tile_fwk_utils中新增host_log模块用于host日志的打印,同时支持dlog和内置log打印,使用策略如下 - host侧有CANN包编译、有CANN包执行,使用dlog - host侧有CANN包编译、无CANN包执行,使用内置log - host侧无CANN包编译、无CANN包执行,使用内置log PS:当前在dlog侧新增了PYPTO的moduleId,考虑到社区的CANN未更新,当前的策略临时调整为全部使用内置log进行打印。 后期社区CANN包更新之后,在按照上述策略重新调整 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!73 months ago
feat(license): Modify license info Co-authored-by: yyyfff<yefan29@huawei.com> # message auto-generated for no-merge-commit merge: !827 merge docs into master feat(license): Modify license info Created-by: yyyfff Commit-by: yyyfff Merged-by: cann-robot Description: Modify incorrect descriptions in the license. Related Issue: [#276](https://gitcode.com/cann/pypto/issues/276) See merge request: cann/pypto!8273 months ago
fix(docs): Fix some formatting problems of markdown files Co-authored-by: lyz0328<liyanzhen@huawei.com> # message auto-generated for no-merge-commit merge: !819 merge master into master fix(docs): Fix some formatting problems of markdown files Created-by: lyz0328 Commit-by: lyz0328 Merged-by: cann-robot Description: fix(docs): Fix some formatting problems of markdown files See merge request: cann/pypto!8193 months ago
Initial commit 5 months ago
Initial commit 5 months ago
fix(tests): Change distribution method Co-authored-by: yyyfff<yefan29@huawei.com> # message auto-generated for no-merge-commit merge: !1017 merge feat/test into master fix(tests): Change distribution method Created-by: yyyfff Commit-by: yyyfff Merged-by: cann-robot Description: Modify ut test to new front See merge request: cann/pypto!10173 months ago
feat(simulation): Add pv model Co-authored-by: zhiweiyuan<zhiweiyuan@huawei.com> # message auto-generated for no-merge-commit merge: !500 merge master into master feat(simulation): Add pv model Created-by: zhiweiyuan Commit-by: zhiweiyuan Merged-by: cann-robot Description: 对接libpem_davinci.so,集成ESL精度仿真能力,在CANN下支持跑出精度结果 1、提供C++入口,支持C++精度仿真能力 2、提供python入口,支持pypto精度仿真能力 See merge request: cann/pypto!5004 months ago
feat(build): Support mixed execution of STest and Examples in a single pytest command to reduce overall runtime Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !636 merge master into master feat(build): Support mixed execution of STest and Examples in a single pytest command to reduce overall runtime Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: feat(build): Support mixed execution of STest and Examples in a single pytest command to reduce overall runtime **Objective:** Enable mixed execution of STest and Examples cases via a single pytest command to reduce overall CI execution time, while unifying configuration files to eliminate conflicts and ensure compatibility across test scenarios. **Key Changes:** 1. **Adjust pytest command logic in build_ci.py**: Analyzed the implementation of build_ci.py and updated the pytest command configuration to execute pytest examples python/tests/st when both -e (Examples) and -s (STest) parameters are specified, enabling mixed running of Examples and STest cases in one command. 2. **Unify conftest.py configuration**: Resolved the issue of duplicate conftest.py files existing in the examples directory and python/tests directory: - Analyzed functional differences between the two conftest.py files; - Consolidated all their functionalities into a single conftest.py file placed in the project root directory; - Ensured full compatibility with UTest execution scenarios to avoid breaking existing UT workflows. 3. **Centralize pytest.ini configuration**: Migrated and extended the functionality of examples/pytest.ini to the project root's pytest.ini for unified configuration management: - Retained pytest's default file/case matching rules for STest and UTest to maintain consistency with standard test practices; - Added support for special file/case matching rules specific to the examples/modules path to preserve its unique test file naming conventions. **Impact:** - Eliminates configuration conflicts caused by multiple conftest.py and pytest.ini files across directories; - Enables mixed execution of STest and Examples via one pytest command, reducing total test runtime; - Maintains full compatibility with existing UTest/STest workflows while standardizing configuration management. Issue: [#196](https://gitcode.com/cann/pypto/issues/196) See merge request: cann/pypto!6364 months ago
fix(operation): Change a2a3 to arch32 Co-authored-by: gguuaanngg<zhangguangjun2@huawei.com> # message auto-generated for no-merge-commit merge: !264 merge master into master fix(operation): Change a2a3 to arch32 Created-by: gguuaanngg Commit-by: gguuaanngg Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/pypto!2644 months ago
feat(model): Add qwen3_next gdr model Co-authored-by: zhuyunlong<zhuyunlong1@huawei.com> # message auto-generated for no-merge-commit merge: !820 merge gdr into master feat(model): Add qwen3_next gdr model Created-by: zhuyunlong Commit-by: zhuyunlong Merged-by: cann-robot Description: qwen3-next模型的gdr算子实现和测试代码 See merge request: cann/pypto!8203 months ago
feat(build): Extend test case executor functionality Co-authored-by: DCGDDD<yangxu14@huawei.com> # message auto-generated for no-merge-commit merge: !1018 merge master into master feat(build): Extend test case executor functionality Created-by: DCGDDD Commit-by: DCGDDD Merged-by: cann-robot Description: 1. Add .arts/ directory to .gitignore to ignore WebIDE default configuration path; 2. Add/complete comments in build_ci.py and setup.py; 3. Optimize parallel execution control script to facilitate future support for Pytest scenarios. See merge request: cann/pypto!10183 months ago

PyPTO

🔥最新动态

  • 2025/12:PyPTO项目首次上线。

🚀概述

PyPTO(发音:pai p-t-o)是一款面向AI加速器的高性能编程框架,旨在简化复杂融合算子乃至整个模型网络的开发流程,同时保持高性能计算能力。该框架采用创新的PTO(Parallel Tensor/Tile Operation)编程范式,以基于Tile的编程模型为核心设计理念,通过多层次的中间表示(IR)系统,将用户通过API构建的AI模型应用从高层次的Tensor图逐步编译成硬件指令,最终生成可在目标平台上高效执行的可执行代码。

核心特性

  • 基于 Tile 的编程模型:所有计算都基于Tile(硬件感知的数据块)进行,充分利用硬件并行计算能力和内存层次结构
  • 多层级计算图转换:通过编译Pass将Tensor Graph转换为Tile Graph、Block Graph和Execution Graph,每一步包括一系列Pass优化流程
  • 自动化代码生成:编译结果通过CodeGen生成底层PTO虚拟指令代码,再通过编译器将虚拟指令代码编译成目标平台的可执行代码
  • MPMD 执行调度:可执行代码被加载到设备侧,通过MPMD(Multiple Program Multiple Data)的方式调度到设备上的处理器核
  • 完整的工具链支持:全流程的编译中间产物和运行时性能数据可通过IDE集成的工具链可视化识别性能瓶颈,开发者也可以通过工具链控制编译和调度行为
  • Python 友好 API:提供直观的Tensor级别抽象,贴近算法开发者的思维模式,支持动态Shape和符号化编程
  • 分层抽象设计:对不同开发者暴露不同抽象层次,算法开发者使用Tensor层次,性能专家使用Tile层次,系统开发者使用Block层次

目标用户

  • 算法开发者:主要使用Tensor层次编程,快速实现和验证算法,专注于算法逻辑
  • 性能优化专家:可使用Tile或Block层次,进行深度性能调优,以实现极致性能
  • 系统开发者:可在Tensor/Tile/Block和PTO虚拟指令集层次上进行三方框架对接或集成,以及工具链开发

⚡️最佳实践样例

PyPTO提供了丰富的示例代码,涵盖从基础操作到复杂模型实现的多个层级。一些最佳实践样例参考:

大模型实现样例

学习路径

examples目录下,我们规划了多个层级的样例:

  • beginner/:基础操作示例,帮助初学者快速上手PyPTO编程
  • intermediate/:中级示例,包括自定义操作、神经网络模块等
  • advanced/:高级示例,包括复杂模式和多函数组合

models/目录下,我们提供了部分大模型实现样例,供快速移植和部署

这些示例可以帮助开发者学习如何编写PyPTO算子,从简单的Tensor操作到复杂的模型网络实现。

⚡️快速入门

若您希望快速体验PyPTO的使用和开发过程,请访问如下文档获取简易教程。

  • 环境部署:介绍项目基础环境的搭建,包括软件包和第三方依赖的获取和安装。
  • 编译安装:环境部署后,介绍如何快速获取或编译PyPTO软件包并安装。
  • 样例运行:安装PyPTO软件包后,介绍如何快速实现样例运行。

📖文档资源

若您希望深入体验项目功能并修改源码,请访问如下文档获取详细教程。

  • 文档中心 :当前发布版本的详细文档,包括编程指南、API参考,贡献指南等
  • 示例代码:丰富的示例代码,从基础到高级应用

🔍目录结构

关键目录如下:

├── docs/                       # 文档资源
│   ├── api/                    # API参考文档
│   ├── contribute/             # 贡献指南文档
│   └── tutorials/              # PyPTO编程指南
│
├── examples/                   # 示例代码
│   ├── 01_beginner/            # 初级示例
│   ├── 02_intermediate/        # 中级示例
│   └── 03_advanced/            # 高级示例
│
├── models/                     # 模型实现示例
│
├── python/                     # Python源码
│   ├── pypto/                  # Python包源码根目录
│   ├── src/                    # pybind11源码根目录
│   └── tests/                  # Python测试用例源码(UTest, STest)
│
├── framework/                  # C++源码根目录
│   ├── include/                # C++对外头文件
│   ├── src/                    # C++源码
│   │   ├── codegen/            # 代码生成模块
│   │   ├── passes/             # 编译Pass模块
│   │   └── ...
│   └── tests/                  # C++测试用例源码
│
├── tools/                      # 工具脚本
│
├── cmake/                      # 构建所需的CMake公共配置及脚本
├── build_ci.py                 # CI执行构建、执行UTest、执行STest辅助脚本
├── CMakeLists.txt              # 顶层CMakeLists.txt,定义所有对外公开编译开关
├── pyproject.toml              # Python编译工具配置文件
├── LICENSE                     # 许可证文件
└── setup.py                    # Python编译工具脚本文件(setuptools)

📝相关信息

联系我们

  • 问题反馈:通过GitCode【Issues】提交问题
  • 功能建议:通过GitCode【讨论】参与交流
  • 技术支持:参考文档或提交Issue

注意:本文档会持续更新,请关注最新版本。

Introduction

No description

Customize my domain

Downloads

0

Total downloads (including clone, pull, ZIP & release downloads), updated by T+1.

Languages

C++78.14%
Python20.39%
CMake1.02%
Shell0.22%
C0.21%