Skip to content

Commit

Permalink
Merge pull request #112 from PAICookers/dev
Browse files Browse the repository at this point in the history
Release: v1.1.0
  • Loading branch information
KafCoppelia authored Jul 3, 2024
2 parents d4bf0b0 + 4593741 commit a4844cc
Show file tree
Hide file tree
Showing 88 changed files with 8,951 additions and 4,500 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ template: |
$CHANGES
Changelog: https://github.com/PAICookers/PAIBox/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
**Full Changelog**: https://github.com/PAICookers/PAIBox/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
4 changes: 2 additions & 2 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"

target-branch: "master"
target-branch: "dev"
16 changes: 12 additions & 4 deletions .github/workflows/pytest-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,37 @@ name: Python CI with pytest

on:
pull_request:
branches: [master, dev]
branches:
- master
- dev
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
pytest-ci:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.2"

- name: Install test dependencies
run: |
poetry install --with test
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ on:
pull_request_target:
branches:
- master
types:
- closed
types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
Expand Down
16 changes: 12 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_install_hook_types: [pre-commit, prepare-commit-msg]
ci:
autofix_commit_msg: ":rotating_light: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: master
autoupdate_branch: dev
autoupdate_schedule: monthly
autoupdate_commit_msg: ":arrow_up: auto update by pre-commit hooks"
repos:
Expand All @@ -13,7 +13,7 @@ repos:
stages: [commit]

- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black
stages: [commit]
Expand All @@ -25,6 +25,11 @@ repos:
types_or: [markdown, yaml, json]
stages: [commit]

- repo: https://github.com/dannysepler/rm_unneeded_f_str
rev: v0.2.0
hooks:
- id: rm-unneeded-f-str

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand All @@ -38,11 +43,14 @@ repos:
- id: check-merge-conflict
- id: mixed-line-ending
- id: name-tests-test
- id: requirements-txt-fixer
args: [--pytest-test-first]
- id: requirements-txt-fixer
- id: pretty-format-json
args: [--autofix]
- id: no-commit-to-branch

- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
rev: 1.8.3
hooks:
- id: poetry-check
- id: poetry-export
Expand Down
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,26 @@

- 提高 `paicorelib` 依赖版本至 `^1.0.0`
- 当出现重名 `paibox.PAIBoxObject` 时将自动修改名称进行规避
- 完善测试CI
- 完善测试ci

## v1.1.0

- 移除 Python 3.8 支持
- 提高 `paicorelib` 依赖版本至 `^1.1.6`
- 提高 `pydantic` 依赖版本至 `^2.0.3`
- 新增功能模块:支持逻辑与、或、非、异或,脉冲加、减、2D平均/最大池化、2D矩阵乘法等算子
- IF/LIF 功能支持

1. 软重置、硬重置模式
2. 负阈值,默认为硬件允许的最小负整数
3. LIF 支持设置偏置,偏置可为数组形式
4. LIF 支持同时设置泄露与偏置,将叠加处理

- 支持神经元的随机突触整合、随机阈值、随机泄露配置的设置,但不支持仿真
- 支持多芯片部署
- 重构路由算法,现在的算法不会出现路由死锁
- 行为变更:

1. 子网络现在直接在主网络内部 `self.subnet=...` 例化即可
2. 编译选项现在直接通过 `paibox.Mapper.compile(...)` 传入,默认配置不变
3.`paibox.Mapper.export()` 中使用 `split_by_chip` 指定配置帧文件是否以芯片分割,默认不分割。原 `split_by_coord` 弃用。
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

<p align="center">
<a href="https://github.com/PAICookers/PAIBox/blob/master/pyproject.toml">
<img src="https://img.shields.io/pypi/pyversions/paibox">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/paibox">
</a>
<a href="https://github.com/PAICookers/PAIBox/releases/tag/v1.0.0">
<img src="https://img.shields.io/github/v/release/PAICookers/PAIBox&color=orange">
<a href="https://pypi.org/project/paibox/">
<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/paibox?color=pink">
</a>
<a href="https://www.codefactor.io/repository/github/PAICookers/PAIBox">
<img src="https://img.shields.io/codefactor/grade/github/PAICookers/PAIBox/master?color=red">
<img alt="CodeFactor Grade" src="https://img.shields.io/codefactor/grade/github/PAICookers/PAIBox?color=orange">
</a>
<a href="https://results.pre-commit.ci/latest/github/PAICookers/PAIBox/master">
<img src="https://results.pre-commit.ci/badge/github/PAICookers/PAIBox/master.svg" alt="pre-commit.ci status">
<img alt="pre-commit.ci status" src="https://results.pre-commit.ci/badge/github/PAICookers/PAIBox/master.svg">
</a>
</p>

PAIBox使用指南[Guide-of-PAIBox](docs/Guide-of-PAIBox.md)
👉 用户使用指南[Guide-of-PAIBox](docs/Guide-of-PAIBox.md)

高效编写测试项目指南:[Guide-of-Test](docs/Guide-of-Test.md)

Expand Down
18 changes: 11 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,23 @@

- [x] 全展开1D卷积
- [x] 全展开2D卷积
- [ ] 逻辑算子:与、或、非
- [ ] 二维矩阵转置
- [ ] 三维矩阵转置
- [x] 位操作逻辑运算:与、或、非、异或
- [x] 2D矩阵转置
- [x] 3D矩阵转置
- [x] 脉冲加、减运算
- [x] 延迟链
- [ ] 1D最大池化
- [x] 2D最大池化
- [ ] 1D平均池化
- [x] 2D平均池化
- [x] 全展开1D转置卷积
- [x] 全展开2D转置卷积
- [ ] 脉冲加、减法
- [ ] 残差结构
- [ ] 半折叠2D卷积

- 多层次结构网络组件的发现、数据流验证与后端解析

- [x] 对有层次结构(子网络例化复用等情形)的网络模型,实现在所有层次上网络组件的发现、数据流与后端解析实现
- [ ] 局部连接包装成单个算子,实现在所有层次上网络组件的发现、数据流与后端解析实现
- [x] 局部连接包装成单个算子,实现在所有层次上网络组件的发现、数据流与后端解析实现(待验证)

- 带有约束的路由坐标分配

Expand All @@ -44,7 +48,7 @@

- [ ] 混合精度权重部署优化:对于网络中存在不同精度的突触情况,需要在后端实现对不同精度突触分组的处理。预期提供一个编译选项:

- [x] 当开启时,当不同精度突触被分在同一组时,将按照最大精度处理;当分在不同组时,按各自精度处理
- [x] 当开启时,当不同精度突触被分在同一组时,将按照**最大精度**处理;当分在不同组时,按各自精度处理
- [ ] 当关闭时,不同精度突触将**不被分在同一组**(即对初次分配的CB进行分割,分割后得到的多个CB仍处于同一RG内)

- [ ] ANN模式前后端支持
Expand Down
Loading

0 comments on commit a4844cc

Please sign in to comment.