paicorelib 是 PAICORE 系列的 Python 支持库,提供坐标、路由、寄存器模型、帧生成、帧解析和载荷打包等基础能力。
安装
pip install paicorelib
需要 Python 3.10 或更新版本。
主要能力
- 坐标、硬件参数、计算核和神经元定义
- 寄存器参数模型
- 路由工具
- 全局信号方向编码工具
- 帧生成工具
- PAICORE 2.5 配置帧流解析工具
- Dense、CSC、BF16、FP32 等权重与载荷打包工具
- PAICORE 2.5 离线/在线 Input SRAM Cfg4 帧和输入打包工具
- AER copy 相对 XY offset 路由辅助工具
Cfg4 输入打包按硬件行宽工作:离线核支持 512-bit 行和 1/2/4/8-bit 输入,在线核 支持 256-bit 行和 1-bit/BF16 输入。工具只生成帧或 SRAM words;调用方负责 SRAM 地址、LCN/time 映射、显式间隔和设备同步,在线潜变量/梯度输入仍走 AER 路径。
文件组织
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
Metadata
Release files for paicorelib 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| paicorelib-2.1.0.tar.gz | 93.3 kB | Without provenance | Details for paicorelib-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paicorelib-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for paicorelib-2.1.0-py3-none-any.whl |
Total release size: 193.3 kB
Release files / paicorelib-2.1.0.tar.gz
| Download URL | paicorelib-2.1.0.tar.gz |
|---|---|
| Size | 93.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f2d51baa798aa3f782f5467e3d3281087ec6b40a0b7021cceeee90c8800fa3a
|
|
BLAKE2b-256 checksum How to use checksums |
d07a69a93470fac898ac355738ad5fff2993c2bb5d19216024b5d5ad71bb08b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / paicorelib-2.1.0-py3-none-any.whl
| Download URL | paicorelib-2.1.0-py3-none-any.whl |
|---|---|
| Size | 99.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8c5e5e003044c0b469aaf0dc8852e160ee0131ac890f50fca262ffe17724f52
|
|
BLAKE2b-256 checksum How to use checksums |
9b0f99e317d7a25467c2f4776ca79405bb965769ff6e9a27e54ec3a01f3bca12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for paicorelib 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.