From 10a6618784aae35de389e0291fd2d78cbfa03bb7 Mon Sep 17 00:00:00 2001 From: Tim Hall Date: Mon, 15 Jun 2020 22:25:58 +0100 Subject: MLBEDSW-2062: Add EAC release notes - Added RELEASES.md - Updated testing and contributions Signed-off-by: Tim Hall Change-Id: Ia5ca3e11f03f03b739d1ce132ee001d5feb2c19e --- CONTRIBUTIONS.md | 6 +++++ RELEASES.md | 31 +++++++++++++++++++++++++ TESTING.md | 71 ++++++++++++++++++++++++++++---------------------------- 3 files changed, 73 insertions(+), 35 deletions(-) create mode 100644 RELEASES.md diff --git a/CONTRIBUTIONS.md b/CONTRIBUTIONS.md index 5bef60a9..2d7175f3 100644 --- a/CONTRIBUTIONS.md +++ b/CONTRIBUTIONS.md @@ -35,3 +35,9 @@ All contributions go through a code review process. Only submissions that are approved and verified by this process will be accepted. Code reviews are performed using the [Vela Gerrit Server](https://review.mlplatform.org/q/project:ml%252Fethos-u%252Fethos-u-vela). + +## Testing Prior to Submission + +Prior to submitting a patch for review please make sure that all the pre-commit +checks and tests have been run and are passing (see [Vela Testing](TESTING.md) +for more details). diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 00000000..fcd100fb --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,31 @@ +# Vela Releases + +These are the release notes for all Vela releases. They document all of the +main feature changes, interface changes and reported defects that have been +fixed. The version numbering adheres to the +[semantic versioning](https://semver.org/) scheme. + +## Release 1.0 - 18/06/2020 + +**Main feature changes:** + +* Int16 support +* New HW operator support: RESIZE_BILINEAR and TRANSPOSE_CONV +* NHCWB16 support between cascaded passes +* Stride 3 support +* pre-commit framework for code formatting, linting and testing + +**Interface changes:** + +* Removal of CLI options: `--batch-size`, `--inter-pass-cycle-delay`, +`--dram-bandwidth` +* Addition of CLI options: `--nhcwb16-between-cascaded-passes` + +**Reported defect fixes:** + +* MLCE-218: Crop2D operator not passing through optimizer +* MLCE-219: Custom Operator not passing through optimizer + +## Release 0.1 - 29/04/2020 + +Initial release. diff --git a/TESTING.md b/TESTING.md index 371ece1f..c5953d96 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,64 +1,67 @@ # Vela Testing -## Sanity checks and tests +## Tools -The Python codebase is PEP8 compliant with the exception of a 120 character line -length. We run reorder-python-import, black and flake8 against the code base -excluding "ethosu/vela/tflite/" and "ethosu/vela/ethos\_u55\_regs" directories -because they are auto-generated by third party tools. Those tools are run using -[pre-commit framework](https://pre-commit.com/). The configuration file is -.pre-commit-config.yaml +Vela's Python codebase is PEP8 compliant with the exception of a 120 character +line length. The following code formatting and linting tools are run on all the +Python files (excluding the directories `ethosu/vela/tflite/` and +`ethosu/vela/ethos_u55_regs` because they contain auto-generated code): -### Install tools +* reorder-python-import (code formatter) +* black (code formatter) +* flake8 (code linter) -To install pre-commit, run the following: +These tools are run using the [pre-commit](https://pre-commit.com/) framework. +This is also used to run the following test and coverage tools: + +* pytest (testing framework) +* pytest-cov (code coverage plugin for pytest) + +### Installation + +To install pre-commit, pytest and pytest-cov in the pipenv virtual environment +use the following command: ```bash pipenv install -e . --dev ``` -After the installation, pre-commit is available in the virtual environment. -Besides pre-commit, we install also: +The remaining tools will all be installed automatically upon first use. -* pytest: testing framework -* pytest-cov: code coverage plugin for pytest +### Add pre-commit hook (Automatically running the tools) -### Install the pre-commit hook - -To ease the development, we can run those sanity checks before committing the -code. To install the git hook, run: +To support code development all the above tools can be configured to run +automatically on `git commit` (except pytest-cov which is run on `git push`) by +using the command: ```bash $ pre-commit install pre-commit installed at .git/hooks/pre-commit ``` -The checks will be run before the commit: if one of them fails, you need to fix -the code to make the checks pass. +When committing (or pushing) if any of the tools result in a failure (meaning an +issue was found) then it will need to be resolved and the git operation +repeated. -### Run the tests +### Manually running the tools -Tests and test coverage can be run using pre-commit framework. - -```bash -$ pre-commit run pytest -... -$ pre-commit run pytest-cov -``` - -### Run the sanity checks - -Those checks can be run manually. This can be achieved running the following +All of the tools can be run individually by invoking them using the following +pre-commit framework commands: ```bash $ pre-commit run reorder-python-imports --all-files ... +$ pre-commit run black --all-files +... $ pre-commit run flake8 --all-files ... -$ pre-commit run black --all-files +$ pre-commit run pytest +... +$ pre-commit run pytest-cov --hook-stage push +... ``` -If you don't specify anything after run, it will execute all the checks. +Alternatively, all of the commit stage hooks can be run using the command: ```bash $ pre-commit run --all-files @@ -66,6 +69,4 @@ Reorder python imports...................................................Passed black....................................................................Passed flake8...................................................................Passed pytest...................................................................Passed -... -... ``` -- cgit v1.2.1