forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TVMC] Add support for the MLF to 'compile' command (apache#8086)
* [TVMC] Add support for the MLF to 'compile' command Add support for the Model Library Format (MLF) to 'tvmc' so users can output compilation artifacts to a MLF archive passing the new flag '--output-format mlf'. For instance: $ python3 -m tvm.driver.tvmc compile ./sine_model.tflite --target="c" --output sine.tar --output-format mlf will generate a sine.tar archive that is serialized accordingly to the MLF. Since the MLF is currently meant to be used only on micro targets, an error is generated if one tries to run a MLF outside a micro context. The micro context does not exist yet but will be later introduced as part of the [RFC] "TVMC: Add support for µTVM". That commit also adds 3 pytest tests to test tvmc + MLF. Finally, it also fixes some missing periods in the 'compile' command help sections and renames export_format to output_format so there is no confusion with flag '--dump-code', which contains "formats to export" in its help section. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> * Fix missing importorskip in the import_package test Fix missing importorskip() in the import_package test allowing the test in question to be skipped when 'tflite' is not installed in the test environment, otherwise the test will fail with: [...] > archive_path = exported_tvmc_package.package_path E AttributeError: 'str' object has no attribute 'package_path'
- Loading branch information
Showing
6 changed files
with
241 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.