aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-08MLIA-590 Support path to custom target profilesAnnie Tallund
- Start using TOML format for target profile - Add support for loading custom target profile files Change-Id: I6be019d4341e93115440ccdbdb6dafdc1c85b966
2023-02-08MLIA-737 Show connection between target / backendBenjamin Klimczak
- The help text of MLIA now shows a table of supported targets, backends and advice. - The table is only shown with the help message and not when MLIA is run normally. Change-Id: I3234ce91e943de4b08b9471bd95a474df34755f7
2023-02-06MLIA-461 Add parameter for the output directoryDmitrii Agibov
- Add CLI parameter --output-dir - Rename ExecutionContext property working_dir into output_dir - Remove logic for default command as it is no longer needed Change-Id: I6387f6b688520ba1fc69a80167587297353620f6
2023-02-03MLIA-782 Remove --output parameterDiego Russo
* Remove --output parameter from argument parser * Remove FormattedFilePath class and its presence across the codebase * Move logging module from cli to core * The output format is now injected in the execution context and used across MLIA * Depending on the output format, TextReporter and JSONReporter have been created and used accordingly. * The whole output to standard output and/or logfile is driven via the logging module: the only case where the print is used is when the --json parameter is specified. This is needed becase all output (including third party application as well) needs to be disabled otherwise it might corrupt the json output in the standard output. * Debug information is logged into the log file and printed to stdout when the output format is plain_text. * Update E2E test and config to cope with the new mechanism of outputting json data to standard output. Change-Id: I4395800b0b1af4d24406a828d780bdeef98cd413
2023-01-31MLIA-785 Enable export into json for enumsDmitrii Agibov
Change-Id: I8e4d5d04f6b1b252dae872ea76d2bd8c41f4b376
2023-01-30MLIA-784 Make CLI options order independentDmitrii Agibov
- Change logic for parameter "-b/--backend" to avoid dependency between CLI options Change-Id: Ic98cb4eb6340cf249fcaa8ec55d17d21b5664b81
2023-01-16MLIA-741/2 Report test resultsRuomei Yan
- add version extraction function in compat.py - create Metadata, MLIAMetadata, TOSAMetadata and MetadataDisplay classes - update the reporting functions so tosa and mlia version will be displayed in output json - update unit test test_configure_and_get_tosa_advisor to mock the get_events function - update the copyright information of all changed/added files - handle exception and report to json when program crashes - write new context managers for capturing stderr and stdout - support reporting stderr to json output - support reporting model checksum and model name to json output - made changes in test_e2e.py handling {model_name} replacement in --output - add unit tests Change-Id: I6629fd1c5754378e6accd488217c83d87c7eb6f1
2023-01-10MLIA-650 Implement new CLI changesRaul Farkas
Breaking change in the CLI and API: Sub-commands "optimization", "operators", and "performance" were replaced by "check", which incorporates compatibility and performance checks, and "optimize" which is used for optimization. "get_advice" API was adapted to these CLI changes. API changes: * Remove previous advice category "all" that would perform all three operations (when possible). Replace them with the ability to pass a set of the advice categories. * Update api.get_advice method docstring to reflect new changes. * Set default advice category to COMPATIBILITY * Update core.common.AdviceCategory by changing the "OPERATORS" advice category to "COMPATIBILITY" and removing "ALL" enum type. Update all subsequent methods that previously used "OPERATORS" to use "COMPATIBILITY". * Update core.context.ExecutionContext to have "COMPATIBILITY" as default advice_category instead of "ALL". * Remove api.generate_supported_operators_report and all related functions from cli.commands, cli.helpers, cli.main, cli.options, core.helpers * Update tests to reflect new API changes. CLI changes: * Update README.md to contain information on the new CLI * Remove the ability to generate supported operators support from MLIA CLI * Replace `mlia ops` and `mlia perf` with the new `mlia check` command that can be used to perform both operations. * Replace `mlia opt` with the new `mlia optimize` command. * Replace `--evaluate-on` flag with `--backend` flag * Replace `--verbose` flag with `--debug` flag (no behaviour change). * Remove the ability for the user to select MLIA working directory. Create and use a temporary directory in /temp instead. * Change behaviour of `--output` flag to not format the content automatically based on file extension anymore. Instead it will simply redirect to a file. * Add the `--json` flag to specfy that the format of the output should be json. * Add command validators that are used to validate inter-dependent flags (e.g. backend validation based on target_profile). * Add support for selecting built-in backends for both `check` and `optimize` commands. * Add new unit tests and update old ones to test the new CLI changes. * Update RELEASES.md * Update copyright notice Change-Id: Ia6340797c7bee3acbbd26601950e5a16ad5602db
2023-01-04MLIA-589 Create an API to get target informationBenjamin Klimczak
Change-Id: Ieeaa9188ea1e29e2ccaad7475d457bce71e3140d
2022-12-30MLIA-761 Constrain dependenciesBenjamin Klimczak
Constrain dependencies in the setup.cfg to avoid incompatibilities when dependencies are updated. Change-Id: I6e26a769bc677827da3ffd90a9b7ad510e3b4d4f
2022-12-19MLIA-756 Fix Vela bug in MLIA caused by numpyRaul Farkas
Set a constraint for numpy in MLIA to be < 1.24. This is needed to fix the temporary issue that Numpy is causing in Vela 3.6 (i.e. "AttributeError: module 'numpy' has no attribute 'bool'") Change-Id: Ie9c99a7a328b5db4c89bccc9429ab93d6a88fe9e
2022-12-16MLIA-460 Revisit backend managementDmitrii Agibov
- Provide command for backend installation in case if backend is not available - Fix issue with connection timeout during downloading - Show installation tools output only in verbose mode Change-Id: Ic0e495ba19879cc2cda4fd0bce20b57ba896cfeb
2022-12-14MLIA-468 Skip e2e tests if backend is unavailableBenjamin Klimczak
The behavior can be modified using the flag '--no-skip' for the e2e tests, i.e. providing the flag will let the tests fail when the backend is unavailable and otherwise these tests are skipped per default. Also use commas instead of semi-colons to separate Python versions. Change-Id: Ib2b9f6c66ce4d500b0d50080d127c06e43616c3d
2022-12-09Pin tox version to avoid issues with tox 4.Benjamin Klimczak
Change-Id: Ib613db35d9047e9ca90559a856a4357f96427bb6
2022-12-06MLIA-669 Upgrade dependencies with Vela 3.6Benjamin Klimczak
With Vela 3.6 we are able to remove the special treatment of aarch64 in our dependencies, i.e. - upgrade Vela to version 3.6 that resolves a compatibility issue for aarch64 in 3.4 and 3.5. - upgrade to TensorFlow 2.10 which now supports aarch64 (therefore making it obsolete to use 'tensorflow-aarch64'). Change-Id: I86508b667b5ccb55bfd11dcae9defc54e5ef74de
2022-11-29Rename modulesDmitrii Agibov
- Rename module "mlia.devices" into "mlia.target" - Rename module "mlia.target.ethosu" into "mlia.target.ethos_u" - Rename module "mlia.target.cortexa" into "mlia.target.cortex_a" - Rename and update tests Change-Id: I6dca7c8646d881f739fb6b5914d1cc7e45e63dc2
2022-11-29Move TOSA checker functions into separate moduleDmitrii Agibov
- Create module "compat" for tosa_checker backend - Move TOSA checker functions into new module - Update tests Change-Id: Ia07034515fe43b2061b8892535067d21315cc721
2022-11-29Move backends functionality into separate modulesDmitrii Agibov
- Move backend management/executor code into module backend_core - Create separate module for each backend in "backend" module - Move each backend into corresponding module - Split Vela wrapper into several submodules Change-Id: If01b6774aab6501951212541cc5d7f5aa7c97e95
2022-11-25MLIA-676 Migrate e2e tests to toxBenjamin Klimczak
- Add new tox environments 'e2e' and 'e2e_setup' - Move the extra 'dev' requirements to the tox environments Change-Id: I7db80f48a7a4ef81f931c0ef307d9bcf5906af19
2022-11-22MLIA-722/MLIA-723 Update RELEASES.md with known issues0.5.0Diego Russo
Update RELEASES.md with a known issue when running TOSA operator compatibility with some models. Change-Id: Ic1d0d34d6ef0b8876e2e7331b46cd6f00b9939a0
2022-11-21Improve the CLI outputBenjamin Klimczak
Resolves: MLIA-719, MLIA-720 Change-Id: Ib697046f5090260437f3b1ab5fe8c5b4975abae2
2022-11-21Add copyright/license to docs/source/conf.pyDiego Russo
File docs/source/conf.py is autogenerated by sphinx and it needs to carry Sphinx copyright notice and license. Change-Id: I6f506326e876e03515e2f6b4c5986f4f12b93302
2022-11-21MLIA-718 Review the README.mdBenjamin Klimczak
Change-Id: Ibdc5d32e6c0a472fe36186f5d35434b379e02ff4
2022-11-17MLIA-136, MLIA-193 Enable test for model clusteringDmitrii Agibov
- Enable previously disabled test for clustering - Remove fix made in the test for the previous TFMOT version Change-Id: I46b87ce5bcccccca3c9703741dcde7f1ba9fa192
2022-11-16MLIA-605 Avoid duplicating CLI help in READMEBenjamin Klimczak
Change-Id: If2156a4a4224f54875fb35c95062fde0a6dca907
2022-11-16MLIA-649 Support tosa-checker as a backendDmitrii Agibov
- Add new type of the backend based on python packages - Add installation class for TOSA checker - Update documentation - Extend support of the parameter "force" in the "install" command Change-Id: I95567b75e1cfe85daa1f1c3d359975bb67b2504e
2022-11-15MLIA-649 Strip mlia backend management into a new commandRuomei Yan
* add entry point for mlia-backend in setup.cfg and main.py * add --force option for install from path: uninstall existing backend in ML Inference Advisor and install from given path * add uninstall and list program parameters: uninstall has backend_name as input arg, install has backend_name as a mandatory argument * add unit tests in test_cli_commands.py, test_cli_main.py, test_tools_metadata_common.py, test_tools_metadata_corstone.py * updated README.md * remove --download option for installing backend * add new lines for the display section when we do mlia-backen list * add case insensitive support for backend names in command line argument Change-Id: Icb89d8957fa6be4b767710e24fa074f26472674b
2022-11-15MLIA-685 Warn about custom operators in SavedModel/Keras modelsDmitrii Agibov
- Add new error types for the TensorFlow Lite compatibility check - Try to detect custom operators in SavedModel/Keras models - Add warning to the advice about models with custom operators Change-Id: I2f65474eecf2788110acc43585fa300eda80e21b
2022-11-11MLIA-705 Add support email in the README.mdDiego Russo
Change-Id: I35b225d6140223fa2ebc7343691da67a99382177
2022-11-11MLIA-701 Update dependenciesBenjamin Klimczak
- Update TensorFlow dependencies for x86_64 - Adapt unit tests to new TensorFlow version - Update linters (including pre-commit hooks) and fix issues - Use conditional import to fix tflite compat code for aarch64 Change-Id: I1a9b080b900ab65e38f7f2552562822bbfdcd259
2022-11-10MLIA-411 Report Cortex-A operator compatibilityBenjamin Klimczak
Check input model for Arm NN TensorFlow Lite Delegate 22.08 support. Change-Id: I1253c4c0b294c5283e08f0a39561b922ef0f62e6
2022-11-09MLIA-698 Update RELEASES.mdDiego Russo
Update RELEASES.md for upcoming 0.5.0 release Change-Id: I3179aeda828d8cdb2a9977adcfa6aeb9517186c0
2022-11-09MLIA-275 Remove support for CSV outputBenjamin Klimczak
Change-Id: I212c9cad5f2ac28b75b1d9e2fb8f1f8b444b8397
2022-11-09MLIA-675 Re-position inclusive language sectionRaul Farkas
* Fix minor typo * Position inclusive language section at the top of the README.md Change-Id: I90538a497d1acbac3463e9af7eb00091337c69d3
2022-11-08MLIA-675 Add inclusive language section to READMERaul Farkas
Change-Id: If922df0eb21b988da2fa377008c1777499a266c1
2022-11-08MLIA-630 Fix links to other files in README.mdRaul Farkas
* Update setup.py to replace relative paths in README.md with links to files on review.mlplatform.org * Add a mechanism that replaces relative paths to images with the link to the plain image on review.mlplatform.org Change-Id: Ifeb17e3c03e8366bd12665eb9f4a630fc9933e26
2022-11-07MLIA-688 Fix --supported-ops-report flagRaul Farkas
* Add `api.generate_supported_operators_report` that calls a report generator based on given target profile. * Update `--supported-ops-report` cli flag help section and README.md info by specifying that it is currently only supported for Ethos-U. * Add tests for `generate_supported_operators_report` method. * Add stub methods `report` for Cortex-A and Tosa operators.py module that throw a "Not supported" exception. Change-Id: Iaf373fe48299d807e48fd6a0e6c029ce32203f4f
2022-11-02Add links to other reasurces in README.mdRaul Farkas
* Add link to SECURITY.md and RELEASES.md in the Resources section of README.md Change-Id: I16c5d31f11297c4f62cb62a586b3aaf6f7363e44
2022-11-01MLIA-681 Add pip.conf as secret on docker buildRaul Farkas
* Update commands that use pip to install python packages by mounting a pip.conf file (where available). Change-Id: Id76c03d6970ea927cea1078f4954f0733534e257
2022-10-26MLIA-433 Add TensorFlow Lite compatibility checkDmitrii Agibov
- Add ability to intercept low level TensorFlow output - Produce advice for the models that could not be converted to the TensorFlow Lite format - Refactor utility functions for TensorFlow Lite conversion - Add TensorFlow Lite compatibility checker Change-Id: I47d120d2619ced7b143bc92c5184515b81c0220d
2022-10-21MLIA-671 Update generic inference runner to 22.08Diego Russo
Due to the new version of Corstone-310, the generic inference runner has been updated to 22.08: * The inference runner 22.08 doesn't have timing adapters because incompatible with new version of Corstone-310 * Remove some memory mode logic which is not needed anymore * Corstone-310 allows to run Ethos-U65 simulation hence adding the binary for enabling this case * Delete the inference runner 22.05 * Fix codebase and tests to cope with changes above Change-Id: I3dc894d7cb49b09102a19b0d7f588694a0f3b99f
2022-10-18MLIA-409 Create new Cortex-A device skeletonRaul Farkas
* Add Cortex-A device skeleton * Add unit tests for the Cortex-A device skeleton * Update profiles.json by adding the new "cortex-a" profile * Add new cortex-a factory to the get_advisor method in api.py * Disable performance and optimization commands for the cortex-a profile. * Update trademarks section in README.md * Update pyproject.toml to not run similarity check in imports Change-Id: I2e228aaada1e2d3c5cc329d70572b51962ff517f
2022-10-17MLIA-646 Add environment to setup pre-commit hooksBenjamin Klimczak
- Add new environment 'lint_setup' to set up the pre-commit hooks used by the environment 'lint' without running the actual tests. - Add docker file for linting and testing to the project root. - Add helper script 'install_python_versions.sh' for docker creation. Change-Id: I5f264df72a72d7a118ab798eddcf0febd4e1125b
2022-10-07MLIA-607 Update documentation and commentsDmitrii Agibov
Use "TensorFlow Lite" instead of "TFLite" in documentation and comments Change-Id: Ie4450d72fb2e5261d152d72ab8bd94c3da914c46
2022-10-06MLIA-619 Use --build-option flag when building MLIADiego Russo
Replace --global-option flag with --build-option flag to pass the platform name when building MLIA. Change-Id: I4b66a6480e0713070c5db35d4301a0129c5af330
2022-10-05MLIA-622 Fix TOSA checker dependencyRaul Farkas
Change TOSA checker dependency in setup.cfg from "tosa_checker" to "tosa-checker". Change-Id: I52f7e545c3e4c0d8e70118b85c7c549568f17bc4
2022-10-04MLIA-670 Use importlib for getting package versionDmitrii Agibov
Change-Id: I2ce8ccebf8a9972d9936164ae52912044c682633
2022-10-04MLIA-673 Use inclusive language in the source code and filenamesDmitrii Agibov
- Update configuration for inclusive language linter - Fix reported issues Change-Id: If0f8b6e20c17d8ee1c6179c61040fc351437f036
2022-10-04MLIA-580 Fix test that produces untracked filesDmitrii Agibov
- Create separate test for the application execution, update test application configuration file - Use simple mock object in the test for the backend manager Change-Id: Ia0f7f29d43a55223d7b2fb47348b0779a26e2268
2022-09-30MLIA-647 Fix backend install for Corstone-300 on AVH/VHTGergely Nagy
- Remove the extra 's' character which broke the path detection mechanism when installed from /opt/VHT location on AVH instances - Add unit tests to make sure we fixed the problem Change-Id: Ic33a3c6c4d2b33181268d0efbc0324962e741dd4