forked from AXERA-TECH/pyaxengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,57 @@ | ||
# pyaxengine | ||
# PyAXEngine | ||
|
||
[![License](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://raw.githubusercontent.com/AXERA-TECH/pyaxengine/main/LICENSE) | ||
|
||
## 简介 | ||
|
||
**PyAXEngine** 基于 cffi 模块实现了 Axera NPU Runtime 的 Python API,方便开源社区开发者使用 Python 脚本快速构建 NPU 推理脚本 | ||
|
||
支持芯片 | ||
|
||
- AX650N | ||
- AX630C | ||
|
||
环境版本 | ||
|
||
- python >= 3.8 | ||
- cffi >= 1.0.0 | ||
- ml-dtypes >= 0.1.0 | ||
|
||
## 快速上手 | ||
|
||
基于社区开发板 **爱芯派Pro(AX650N)** 进行展示 | ||
|
||
### 获取 wheel 包并安装 | ||
|
||
- [下载链接](https://github.com/AXERA-TECH/pyaxengine/releases/download/0.0.1rc1/axengine-0.0.1-py3-none-any.whl) | ||
- 将 `axengine-x.x.x-py3-none-any.whl` 拷贝到开发板上,执行 `pip install axengine-x.x.x-py3-none-any.whl` 安装 | ||
|
||
### 简单示例 | ||
|
||
将 [classification.py](https://github.com/AXERA-TECH/pyaxengine/blob/main/examples/classification.py) 拷贝到开发板上并执行。 | ||
|
||
``` | ||
root@ax650:~/samples# python3 classification.py | ||
[INFO] Chip type: ChipType.AX650 | ||
[INFO] Engine version: 2.7.2a | ||
[INFO] VNPU type: VNPUType.DISABLED | ||
[INFO] Model type: 0 (single core) | ||
[INFO] Compiler version: 1.2-patch2 7e6b2b5f | ||
Top 5 Predictions: | ||
Class Index: 282, Score: 9.77352523803711 | ||
Class Index: 278, Score: 8.981077194213867 | ||
Class Index: 277, Score: 8.452778816223145 | ||
Class Index: 281, Score: 8.320704460144043 | ||
Class Index: 287, Score: 7.924479961395264 | ||
``` | ||
|
||
## 关联项目 | ||
|
||
- [ax-samples](https://github.com/AXERA-TECH/ax-samples) | ||
- [ax-llm](https://github.com/AXERA-TECH/ax-llm) | ||
- [pulsar2](https://pulsar2-docs.readthedocs.io/zh-cn/latest/) | ||
|
||
## 技术讨论 | ||
|
||
- Github issues | ||
- QQ 群: 139953715 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters