aboutsummaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
AgeCommit message (Collapse)Author
2022-03-30Update version of Black to 22.3.0Jonas Ohlsson
Update version of Black to 22.3.0 due to updated dependencies. Updates to fix reported issues due to new version. Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com> Change-Id: I60056aae452093ce8dcea1f499ecced22b25eef1
2022-03-21MLBEDSW-3367 Add mypy to pre-commitJonas Ohlsson
Add mypy to pre-commit and clean up all reported errors. Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com> Change-Id: If7dc869f5fecdb0e2db40f14e7d9db21aa33df71
2022-03-04MLBEDSW-3367 Update pre-commit flake8 versionJonas Ohlsson
Update the version of flake8 used in pre-commit to facilitate adding mypy to pre-commit. Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com> Change-Id: I457dec87b77487ca6f14ff4a679c4cc927b272b0
2022-02-09MLBEDSW-5912 - Update to Python 3.8Rickard Bolin
Change required python version from 3.6 to 3.8 in setup.py and allow any python3 version for black pre-commit linting. Signed-off-by: Rickard Bolin <rickard.bolin@arm.com> Change-Id: I0d8936d92efd5137561834c0de1a3449f9e5f25c
2021-07-08MLBEDSW-4838 Added basic TOSA support.Patrik Gustavsson
Added basic TOSA support, enabling Vela to read and compile a .tosa file corresponding to CONV2D + Rescale + Clamp, and writing it to an optimized .tflite file. The optimized .tflite file, will in this case, hold a commandstream where the Rescale and Clamp has been fused into the CONV2D. The optimized tflite file is not output from Vela. -Added support to read .tosa file into Vela internal structure. - Added tosa_reader.py, tosa_mapper.py and helper files stored under tosa/ - Support for this limited to ~10 ops -Added reader_util.py for functions common for TOSA and TFLite -Added tosa_graph_optimiser.py -Added support to fuse Rescale into convolution -Modified handling for padding -Added support to fuse Clamp to previous op -Added graph_optimiser_util.py -Moved functions common for TOSA/TFLite graph optimization to this file. -Renamed graph_optimiser.py to tflite_graph_optmiser.py -Added separate tosa_supported_operators.py -Added supported_operator_util.py -For functions in common for TOSA/TFLite Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: Ic3c540504ec8c5eb4771397fdc6882050ecf33ab
2020-12-09vela: Update pre-commitMichael McGeagh
Added pylint to pre-commit, but enabled only for scanning W0102 "dangerous-default-value". Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com> Change-Id: I49b887f6b862dd05fdcb465ae5097e5c2dc335aa
2020-10-07Updated pre-commit config to use 19.10b0 version of BlackDwight Lidman
The latest "stable" version of Black formats code differently from the 19.10b0 version that has been used in the past, which introduces unwelcome formatting changes in newer commits. This commit explicitly sets the revision to 19.10b0. It also changes the repo parameter to point to the new URL. Signed-off-by: Dwight Lidman <dwight.lidman@arm.com> Change-Id: I20c73f0c87434143f62282f5f0399f73cedfd6ce
2020-06-18tools: Fix pytest-cov in pre-commitTim Hall
- Corrected name in config file Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: I245571605173466d08ea2a2139444fc9ff519d3b
2020-06-18Add test for len1_array_to_scalar functionDiego Russo
Moved len1_array_to_scalar from a nested function to a staticmethod of TFLiteSubgraph. Change-Id: I182f0b70f03070855c1a4478d26644892c1ebb15 Signed-off-by: Diego Russo <diego.russo@arm.com>
2020-06-18Add pytest/pytest-cov support for pre-commitDiego Russo
Pytest (testing framework) and pytest-cov are now part of the python environment and run automatically by pre-commit hook. Change-Id: If55cae9f29391c80c809a0487785786a7b9ae62a Signed-off-by: Diego Russo <diego.russo@arm.com>
2020-06-18Add reorder-python-import pre-commit hookDiego Russo
Also updated README.md Change-Id: I118309c61f4d00e8508d6b888c606995490fba39 Signed-off-by: Diego Russo <diego.russo@arm.com>
2020-06-18Add pre-commit support for sanity checksDiego Russo
Use pre-commit framework [1] to run black and flake8 before the commit. black and flake8 are managed by the pre-commit framework and they can be run manually by the user using `pre-commit run` command. Fix the code base with the help of black and flake8. Fix import statements according to PEP8 guidelines [1] Both tools have the following settings (specified in the pre-commit configuration file): * line length: 120 characters * directory to exclude: ethosu/vela/tflite/ and ethosu/vela/ethos_u55_regs Updated README.md on how to install pre-commit and how to run sanity checks. Pipenv files have been updated including new dependencies for pre-commit. [1]: https://www.python.org/dev/peps/pep-0008/#imports [2]: https://github.com/pre-commit/pre-commit Change-Id: I304d9fffdf019d390ffa396a529c8a7c2437f63d Signed-off-by: Diego Russo <diego.russo@arm.com>