* Finish support for list-of-targets
This finishes the work started in https://github.com/apache/tvm/pull/11173 to support
'external codegen' targets in the N build-like API surfaces.
- It turns out it's ok if a build is given only a single 'external codegen' target, so remove that check
in CompilationConfig::Init. When Collage builds a 'candidate partition' it does so for a single target.
As far as Collage is concerned it does not care whether the target is regular (eg Target("cuda")), or
for a specific external codegen (eg Target("cutlass")), it just passes the target into the build.
- Add CompilationConfig::FindPrimitiveTargetForKind which I'll later need to retrieve
the external codegen Target instance corresponding to a "Compiler" attribute value.
- Target.update_target_host_consist was supporting three API styles:
- single target
- map from device type to target
- map from target to IRModule (for the ir_to_runtime API)
I replaced all those calls with a more specialized 'canonicalize' call:
- Target.canonicalize_target_and_host
- Target.canonicalize_multi_targets_and_host
- Target.canonicalize_target_map_and_host
In particular, all the tuning interfaces (task extraction, tuning, tuning records) all explicitly
*do not* support multiple targets since the underlying code just doesn't support that.
* - Lints
- Revert unintended changes
* - more lints
* - Fix model_library_format handling of target.
- Improve comments in compilation_config.h
* - Lints
- Update target/target_host params documentation
* - Fix micro library format tests
- Rev micro library format from 5 to 6
- Use Target.current() in a few places
* - eta contract comprehension
* - Woops, one more device: target map left
- Handle host already being in Target
* - lint
* - lint
* - Bug with append
- Take device type from target
* - Fix hexagon
* Fix function number datatype from char to uint16_t
rewrite the modified part to pass lint check
Use 2 bytes for func num in fun_registry
Fix errors in linter
Add the declaration of the helper functions
set 2 bytes for func num in func_registry test units
pass num_func by value
This commit change the datatype of the number of the function from 1 Byte to 2 Bytes.
Besides, I use some helper functions to access the number of function and the first function name.
* Fix aot_executor_module to unbreak CI.
* Fix GraphExecutorModule.
* Remove graph_json_to_c_func_registry.
* No longer needed and not called anywhere.
* Superseded by emitting the FuncRegistry directly in codegen.
Co-authored-by: 嚴中璟 <a1245967@gmail.com>
This reverts commit aa3bcd9d33, because it
fails on Windows CI as reported in issue #11220. PR #11223 tries to address
it but is is failing in the regular CI with testing issue on Hexagon.
* [USMP] Adding support for U4 usecase
This commit adds support for placing I/O
tensors within the workspace buffer.
This is enabled using PassConfig option
tir.usmp.use_workspace_io. Once it is enabled,
it will remove the I/O tensors from the TIR
main PrimFunc and replace them with Allocate
nodes that is annotated to contain Input and
Output tensors.
The USMP will plan memory for them accordingly.
(i.e. it will re-use space used by them for
intermediaries depending on the liveness).
This will only be supported with C Interface API.
Thus, this commit produces two functions to the
metadata sources to obtain input and output structs
that points to location inside the workspace struct.
Change-Id: I4c7e750ead9a880ba900602c17f53a125f97dbf9
* fixup! [USMP] Adding support for U4 usecase
Change-Id: I78f03d36b12b4a5e8eae8d11701f51019489defc
* fixup! [USMP] Adding support for U4 usecase
Change-Id: I857f3d0ba7bc192d56d750c44b232998b2876e7a
* Add memory pools to Metadata classes.
* Move ShapeToJSON to utils.
* Track returned TensorType from AOTExecutorCodegen.
* Support calling Relay functions with Tuple.
* Expand supported TIR calling conventions to work with C++ runtime.
* Rename MetadataModule to ConstLoaderModule.
* Add runtime AOT executor module.
* Add AOT code-generation.
* Add a runtime Module to mux between .text Metadata and live Metadata.
* Move launch_param to namespace
* Add test of c++ AOT.
* Fix incongruity between kTvmRuntimeCrt constant
* Expand ExecutorCodegenMetadata to include AOT runtime metadata.
* commit cpp test
* Make Metadata compile under C.
* Ignore ephemeral metadata_module export_model_library_format.
* This module does not need to be exported, since it is merely a C++
wrapper around get_c_metadata, and get_metadata is not used in C.
* address manupa, kparszsyc, masahi comments.
* further address comments
* clang and python format
* Fix broken test
* Address lingering comments from masahi, kparszyzc
This commit adds a MemoryPools argument for
the compilation flow according to RFC0029.
Moreover, it is used to provide support for
external pools from the application layer
that could be pinned for different memories
and/or be reused between multiple inferences
of a model.
* Adds runtime to AOTExecutorFactoryModule
* Standalone CRT files are added to MLF tarball if runtime is crt
* external_dependencies info added to metadata.json for crt runtime
* microNPU demo Makefile references standalone crt files from MLF tarball
* Allow export of C++ kernels using correct file extension
* [WIP] Set module_key=c for CSourceCrtMetadataModuleNode to temporarily fix failing tests
I realized that the module format `cc` is currently already used by the `CSourceCrtMetadataModuleNode` declared in `src/target/source/source_module.cc`.
This needs to be discussed first to decide if either the module_key should be changed or the test cases expecting the systemlib kernel (e.g. `default_lib0.c`) to have a `.c` extension.
* Update Makefiles used by tests/python/relay/aot/ to support C++ file extensions
AOT: Add c++ support to aot_test.mk
AOT: Add c++ support to corstone300.mk
* Add missing definition of GetFormat to cmsisnn and ethosn codegens (WIP)
* Resolve PR comments
* lint python/tvm/runtime/module.py
* fix EthosUModuleNode for CI
* Fix: detect empty module.format
* Add error message to assertion
* Lint python/tvm/runtime/module.py
This commit removes prepare_options() helper function because it's now
superfluous since the default values for the project options are now set
correctly at the server side, hence there is no need to force settting
them at the client side.
Also prepare_options() can incorrectly set the default value of Zephyr's
'west_cmd' option when that option is not passed by the user. Hence by
removing that function this issue is resolved too.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
This PR exposes the workspace size as a macro
TVMGEN_DEFAULT_WORKSPACE_SIZE in tvmgen_default.h
(or TVMGEN_<MODEL_NAME>_WORKSPACE_SIZE in
tvmgen_<model_name>.h in the case that the model name is not default).
This functionality is useful for microTVM/AOT use cases
where it's useful to know the workspace size at compile time.
* [TVMC][Relay] Introduce executor and runtime parameters
This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.
Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.
Validated the demo application continues to classify the tabby cat with
new CLI options.
* Correct Graph Executor Python API
* [microTVM] zephyr: Make platform options comply with RFC-0020
Make Zephyr platform options comply with RFC-0020 specification.
Project options now need to specify the required metadata for every
option, i.e. 'required', 'optional', and 'type'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [microTVM] arduino: Make platform options comply with RFC-0020
Make Arduino platform options comply with RFC-0020 specification.
Project options now need to specify the required metadata for every
option, i.e. 'required', 'optional', and 'type'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [microTVM] crt: Make crt options comply with RFC-0020
Make crt project options comply with RFC-0020 specification.
Project options now need to specify the required metadata for every
option, i.e. 'required', 'optional', and 'type'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [microTVM][Unittest] Adapt test to RFC-0020
Adapt test to new metadata fields accordingly to RFC-0020 specification.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [microTVM] Add info() method to GeneratedProject class
Add info() method to GeneratedProject class so one can use the Project
API to query options for project dirs instead of only for template
projects.
This commit also adds for the sake of convenience a setter and a getter
for 'options' in case it's necessary to set or get 'options' after a
GeneratedProject class is instantiated without initializing 'options'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [microTVM] Fix typo in python/tvm/micro/session.py
Fix typo in comment.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* Allow multiple runs on micro targets
Currently there is a limitation on microTVM / TVM which doesn't allow
running a model multiple times in sequence without previously flashing
the model to the device.
Root cause is that RPCModuleNode class destructor is called once a run
finishes. The destructor sends a RPCCode::kFreeHandle packet with
type_code = kTVMModuleHandle to the device which wipes entries in
crt/src/runtime/crt/common/crt_runtime_api.c:147:static const TVMModule*
registered_modules[TVM_CRT_MAX_REGISTERED_MODULES] when TVMFreeMod() is
called when the target receives a kFreeHandle packet.
Hence when one tries to re-run a model registered_modules[0] == NULL
causes a backtrace on the host side. Probably never before a model on
microTVM was run without being flashed just before the run, so tvmc run
implementation for micro targets exposed the issue.
This commit fixes it by not calling TVMFreeMod() for system_lib_handle
on the target side when a session terminates so the pointer to the
system_lib_handle is not flushed from 'registered_modules', allowing
multiple runs on micro targets.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [TVMC] Pass main parser when calling add_*_parser functions
Currently when a add_*_parser functions are called in main.py to build
and add the various subparsers to the main parser only a subparser is
passed to the functions. However if one of these functions need to build
a dynamic parser it needs also to call the main parser at least once to
parse once the command line and get the arguments necessary to finally
build the complete parser.
This commit fixes that limitation by passing also the main parser when
calling the subparser builders so it can be used to build the dynamic
subparses.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [TVMC] micro: Add new micro context
This commit introduces support for micro targets (targets supported by
microTVM). It creates a new micro context under the new TVMC command
'tvmc micro'. Moreover, three new subcommands are made available in the
new context under 'tvmc micro': 'create-project', 'build', and 'flash'.
The new support relies on the Project API to query all the options
available for a selected platform (like Zephyr and Arduino) and also
from any adhoc platform template directory which provides a custom
Project API server.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [TVMC] run: Add support for micro devices
Add support for micro devices using the Project API to query all options
available for a given platform and open a session with an specified
micro device. Use of 'tvmc run' with micro device is enabled via the
'--device micro' option in addition to the project directory.
Once the project directory is specified 'tvmc run' will make all options
specific to the platform found in the project dir available as options
in 'tvmc run'. They can be listed by '--list-options' and passed via
'--options'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [AOT][DeviceAPI] Connecting devices structure to relevant operators
This patch adds support for passing the device context via the unpacked API in AOT, generating an additional struct if necessary:
```c
/*!
* \brief Device context pointers for TVM module "default"
*/
struct tvmgen_default_devices {
void* npu;
};
```
Which is then added as an argument to the entry function:
```c
/*!
* \brief entrypoint function for TVM module "default"
* \param inputs Input tensors for the module
* \param outputs Output tensors for the module
* \param devices Device context pointers for the module
*/
int32_t tvmgen_default_run(
struct tvmgen_default_inputs* inputs,
struct tvmgen_default_outputs* outputs,
struct tvmgen_default_devices* devices
);
```
I've temporarily added the collection of external code generators to the TE compiler pending proper annotation of the eventual functions.
Co-authored-by: Grant Watson <grant.watson@arm.com>
* Correct "use_device_api" attribute name on Target
Co-authored-by: Grant Watson <grant.watson@arm.com>
* Move libinfo into the runtime build
* put libinfo back into libtvm
* limit microtvm imports when we only have the runtime lib
* fix lint
* try conditional for micro import
* init
* test on hardware
* moved to testing.py
* add option to set workspace size
* changed model
* fix memory issue
* fix tests
* conv2d test
* fix simd test
* format
* fix exception
* refactor workspace helper function
* address comments
* revert to fix the bug
* address comment
Using the new name transformations added in #9088, the C interface API is now generated in C++ rather than in Python. This is intended to be a no-op for the actual users of this change and thus I've undone some of my overzealous sanitizing to match that expectation.
Follow up PRs will clean up any remaining name transformation inconsistencies.
Fixes#8792
Currently there is already a wrapper function for creating a new project
directory based on an ExportableModule, but there isn't one for creating
a new project directory based on an existing MLF archive, which is also
handy. Hence that commit adds a new wrapper for creating a project using
an existing model compiled and kept in a MLF archive.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Christopher Sidebottom <chris.sidebottom@arm.com>
Reviewed-by: Andrew Reusch <areusch@octoml.ai>
This is to provide the hint to C++ compilers that these functions are C linkage.
New header looks similar to:
```c++
extern "C" {
/*!
* \brief Input tensor pointers for TVM module "default"
*/
struct tvmgen_default_inputs {
void* y;
};
/*!
* \brief Output tensor pointers for TVM module "default"
*/
struct tvmgen_default_outputs {
void* output;
};
/*!
* \brief entrypoint function for TVM module "default"
* \param inputs Input tensors for the module
* \param outputs Output tensors for the module
*/
int32_t tvmgen_default_run(
struct tvmgen_default_inputs* inputs,
struct tvmgen_default_outputs* outputs
);
}
```
* Initial commit of API server impl.
* initial commit of api client
* Add TVM-side glue code to use Project API
* Change tvm.micro.Session to use Project API
* Rework how crt_config.h is used on the host.
* use template crt_config.h for host test runtime; delete
src/runtime/crt/host/crt_config.h so that it doesn't diverge from
the template
* bring template crt_config.h inline with the one actually in use
* rename to MAX_STRLEN_DLTYPE
* Create a dedicated TVM-side host crt_config.h in src/runtime/micro
* Modify Transport infrastructure to work with Project API
* Add host microTVM API server
* Zephyr implementation of microTVM API server
* move all zephyr projects to apps/microtvm/zephyr/template_project
* consolidate CcompilerAnnotator
* Allow model library format with c backend, add test.
* Update unit tests
* fix incorrect doc
* Delete old Zephyr build infrastructure
* Delete old build abstractions
* Delete old Transport implementations and simplify module
* lint
* ASF header
* address gromero comments
* final fixes?
* fix is_shutdown
* fix user-facing API
* fix TempDirectory / operator
* Update micro_tflite tutorial
* lint
* fix test_crt and test_link_params
* undo global micro import, hopefully fix fixture
* lint
* fix more tests
* Add session_constructor_args to tracker request() function.
* Allows tracker clients to open non-traditional RPC sessions
* Generate entry_func symbol in C host codegen.
* Needed for AutoTVM.
* print MeasureErrorNo enum value in MeasureResult repr
* Add microTVM session constructor.
* This constructor is to be called from the RPC driver to flash and
connect to the RPC server on the microcontroller.
* add build_kwargs as a Builder constructor arg.
* build_kwargs is derived from pre-configured args, the runner, and
now from the script.
* user-supplied build kwargs override the other two, and a warning is
printed if any key is overridden.
* Add do_fork option to Builder, to support stateful builders
* When AutoTVM builder forks, any global state modified by the
build_func is lost between builds
* Checkin module_loader used to build and flash microTVM for autotuning.
* Import micro into top-level when enabled.
* AutoTVM RPC server needs to load the micro session constructor.
* Add tvm.contrib.random.random_fill to microTVM.
* Allows autotuning with random data.
* Move compilation to runner :O
* Add a tutorial for AutoTVM with microcontrollers.
* Fix si_prefix in autotuner callback
* black format and git-clang-format
* Switch tutorial back to qemu version
* improve error reporting so CI will show test error
* black format
* autotvm is working
* fix tutorial
* fix dependencies
* fix auto tune issue
* lint
* address comments
* fix lint
* test crt and zephyr added
* fix func registery size
* moved autotune test and fixed
* fix crt test
* address comments
* change relay text
* change relay in text_zephyr
* class added
* changed relay module in tutorial and cleanup
* address comments
* address TK comments
* change fork
* final comments
* retrigger due to flahy test
* fix tutorial
* retrigger
* fix changes due to merge
Co-authored-by: Andrew Reusch <areusch@octoml.ai>
* Add missing tvm.micro.project_api module file. The missing
__init__.py makes it impossible to import this module with
`import tvm.micro.project_api`.
* This uncover 30-ish linting errors, which are also fixed here.
Add info() method to TemplateProject class so it's possible to query all
available options for a given template project without creating a new
one. This is necessary because TVMC will query the available options for
a given template project to show them to the user so the user can use
them to finally create a new project dir.
That is also useful in general to query the available options for any
project type. For example, one can query all boards available on the
Zephyr platform with:
import tvm.micro.project as project_api
template = project_api.TemplateProject.from_directory(ZEPHYR_TEMPLATE_DIR)
boards = template.info()["project_options"][8]["choices"]
where 8 element refers to the "zephyr_board" option.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* Sanitize names of input tensors in interface header
Change-Id: I7f02a993887bf84316262cd2586a734a9079c338
* Update tensor name sanitizer tests to parameterize them.
Change-Id: I157d8d8d607de2904285e403893f146e97b510d5
* Only test unpacked, C interface API, AOT case
Change-Id: I9082ae32079a1a3924c06c7f26c757aafa46dec2
* Initial commit of API server impl.
* initial commit of api client
* Add TVM-side glue code to use Project API
* Change tvm.micro.Session to use Project API
* Rework how crt_config.h is used on the host.
* use template crt_config.h for host test runtime; delete
src/runtime/crt/host/crt_config.h so that it doesn't diverge from
the template
* bring template crt_config.h inline with the one actually in use
* rename to MAX_STRLEN_DLTYPE
* Create a dedicated TVM-side host crt_config.h in src/runtime/micro
* Modify Transport infrastructure to work with Project API
* Add host microTVM API server
* Zephyr implementation of microTVM API server
* move all zephyr projects to apps/microtvm/zephyr/template_project
* consolidate CcompilerAnnotator
* Allow model library format with c backend, add test.
* Update unit tests
* fix incorrect doc
* Delete old Zephyr build infrastructure
* Delete old build abstractions
* Delete old Transport implementations and simplify module
* lint
* ASF header
* address gromero comments
* final fixes?
* fix is_shutdown
* fix user-facing API
* fix TempDirectory / operator
* Update micro_tflite tutorial
* lint
* fix test_crt and test_link_params
* undo global micro import, hopefully fix fixture
* lint
* fix more tests
* Address tmoreau89 comments and mehrdadh comments
* fix random number generator prj.conf for physical hw
* uncomment proper aot option
* Introduce --interface-api={c,packed} parameter
This introduces structures generated to provide a documented and stable user
friendly interface to a TVM generated model, as can be seen in the AOT
demo application:
```
struct tvmgen_default_inputs inputs = {
.input_1 = input_data,
};
struct tvmgen_default_outputs outputs = {
.output = output_data,
};
int ret_val = tvmgen_default_run(&inputs, &outputs, NULL, NULL);
```
To facilitate this, some other changes are included:
* Removed dependency on `aot_executor.{c,h}` in tests, pending the
discussion in the interface RFC as to whether we keep them.
* Moved creation of test DLTensor's into the AOT test utils, in future this
can be replaced by loading via the Python API or otherwise
* Introduce `parametrize_aot_options` which can be used to test
permutations of AOT which work together - for now this filters C
interface and packed operators
* Updated demo application to generate the header for demonstration
purposes, we should consider porting the demo application to Model
Library Format and using the toolchain in the Zephyr App via CMake
instead?
This patch builds upon the improvements @giuseros made to AOT testing
and name mangling from #8014
* Tweak metadata variable description and MLF target loop
* Remove direct usage of `relay::Var` in meta_data.h
This looks like the only place that could be causing the Windows CI failures, so trying removing the additional header in meta_data.h
* Linting fix
* Post-rebase files fixing
These tests were somehow transmuted in transit, I've updated them to the
most recent variant of the test helpers.
* Strip back interface API to just inputs and outputs
This removes any speculative structures from the generated code and cleans up some of the documentation.
* Add header guards and tweak documentation
* rename _update_target and document its function
* make tvm.build return OperatorModule to return multiple outputs
* allow retrieving the var names used in TIR repr
* add Operator Model Library Format and test
* Add pathlib convenience functions to utils.TempDirectory.
* fix tests
* black format
* git-clang-format
* pylint fixes
* add asf header
* change memory map to make more sense, fix tests
* address giuseros comments
* align GetVarName with future TypedPackedFunc
* fix test
* clang-format
* rev model library format to v4 (bad merge)
* [AOT] Name mangling in AOT
Mini-RFC is here: https://discuss.tvm.apache.org/t/mini-rfc-name-mangling-in-aot
With this change we'll mangle the name of global symbols so that we can bundle
together multiple models in the same application.
The relay.build interface has been left unchanged, which means I am
resuing mod_name as a prefix for all functions. If mod_name is None then
a "_tvm" prefix is used.
I had to add two different compilation functions:
- _CompileEngineLowerWithModuleName to mangle all the operators with the mod_name
- PartitionGraphWithModName to mangle all the operators produced by BYOC
I could have changed signature of both, but that would have meant a very
invasive refactoring.
I refactored the aot test utils and added some tests for multiple
models.
Change-Id: I30e93fa075f660054577ea36cf9268ec0c6eebcb
* retrigger CI
Change-Id: I4f11da7fce1327ad89bb25f25209b57077b2c6a3
* [Docs] Prevented docs/1 file from being generated.
Typo in tests/scripts/task_sphinx_precheck.sh caused $TVM_HOME/docs/1
file to be created with stderr output, rather than merged stderr and
stdout.
* [Docs] Corrected sphinx build warnings
- Previously, several warnings were generated by sphinx, but were
unintentionally suppressed. This PR resolves the sphinx warnings.
* [Docs] Corrected additional sphinx build warnings.
- Rebased on main and corrected warnings, now up to date as of commit
53e4c603.
* [Docs] Corrected additional sphinx build warnings
- Rebased on main and corrected warnings, now up to date as of commit
1f2ca068c.
* [Docs] Corrected additional sphinx build warnings
- Rebased on main and corrected warnings, now up to date as of commit
d0791d3db.
* [Docs] Ignore sphinx warnings from missing "git describe" and sckit-learn versions.
Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
Currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.
This commit fixes it by copying to the build dir (to each lib
dir) the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [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'
* Improved MLF to contain workspace info
Added functionality to calculate workspace, io and constant
memory required by each primfunc and main function. Moreover,
the workspace information required by each primfunc and main
is reported in metadata.json in the Model Library Format(MLF).
- added functionality to record tir and relay primfuncs
- added tests for model_library_format changes
Change-Id: Ib4a8b787345aa35f8a1645e8a648fad84de37bce
* Improved MLF to contain workspace info
* disable AoT for now
* addressing comments
Change-Id: I5f041ec461b02dac6ea9c96ea50eb400d55eef53
* Improved MLF to contain workspace info
* addressed comments
* added aot executor support
Change-Id: I9b54a7939d8ccb3c6ce0454f0fe62866ac66eb5c
* Improved MLF to contain workspace info
* removed redundant utils.py
Change-Id: I256dd88fab31a595bf9509bd1c4ab59b0c145b1e
* Improved MLF to contain workspace info
* removed redundant ffi api
Change-Id: I9ad6795aa839edfdfd05b902d4531fb0a20e894d