paicorelib 是 PAICORE 系列的 Python 支持库,提供坐标、路由、寄存器模型、帧生成、帧解析和载荷打包等基础能力。
安装
pip install paicorelib
需要 Python 3.10 或更新版本。
主要能力
- 坐标、硬件参数、计算核和神经元定义
- 寄存器参数模型
- 路由工具
- 全局信号方向编码工具
- 帧生成工具
- PAICORE 2.5 配置帧流解析工具
- Dense、CSC、BF16、FP32 等权重与载荷打包工具
文件组织
src/paicorelib/
├─ __init__.py # 包级公共导出入口
├─ coordinate.py # 坐标、偏移和坐标工具
├─ hw_defs.py # 硬件参数和常量定义
├─ core_defs*.py # 计算核寄存器枚举和限制
├─ core_model*.py # 计算核寄存器参数模型
├─ neuron_defs*.py # 神经元寄存器枚举和限制
├─ neuron_model*.py # 神经元寄存器参数模型
├─ routing_defs.py # PAICORE 多播路由基础类型
├─ routing_hexa.py # PAICORE 2.5 NoC / AER 路由和全局信号编码工具
├─ float_codec.py # BF16/FP32 数值载体和载荷编码工具
└─ framelib/
├─ frame_defs.py # 帧格式和字段定义
├─ frames.py # 帧对象定义
├─ frame_gen*.py # 帧生成工具
├─ parser_v2.py # PAICORE 2.5 配置帧流解析
├─ types.py # 帧数组和载荷类型
└─ utils.py # 帧载荷辅助工具
文档
开发
uv sync --group dev
uv run pytest -q
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paicorelib-2.0.0.tar.gz
(80.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paicorelib-2.0.0.tar.gz.
File metadata
- Download URL: paicorelib-2.0.0.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a41a1524025d8ab5955014569fde35ba5f0af7607c608bfd5a7cd3eb2899fe5
|
|
| MD5 |
2682fd82b0c4c129d30a3887d8146db7
|
|
| BLAKE2b-256 |
47abdcff284b194ed92b5dcc8d3f9cdb4cc9020fd60bab4934b425abe51b498e
|
File details
Details for the file paicorelib-2.0.0-py3-none-any.whl.
File metadata
- Download URL: paicorelib-2.0.0-py3-none-any.whl
- Upload date:
- Size: 88.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d200adfe15ffb2b3a92d2f7f4ea24d25cbecaf29a3ffe6ee16e1c6b4a69000e
|
|
| MD5 |
c0cbfb1e221cb60d4fc2a92b9010f886
|
|
| BLAKE2b-256 |
50962fb3d8a342957788ec3e1122f80241e43571c102654b2e473f50b9dd61a6
|