Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce --interface-api={c,packed} parameter #8280

Merged
merged 7 commits into from
Aug 2, 2021

Commits on Aug 1, 2021

  1. 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 apache#8014
    Mousius committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    7348419 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a019367 View commit details
    Browse the repository at this point in the history
  3. 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
    Mousius committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    babb2e2 View commit details
    Browse the repository at this point in the history
  4. Linting fix

    Mousius committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    f8e6e43 View commit details
    Browse the repository at this point in the history
  5. Post-rebase files fixing

    These tests were somehow transmuted in transit, I've updated them to the
    most recent variant of the test helpers.
    Mousius committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    c699703 View commit details
    Browse the repository at this point in the history
  6. 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.
    Mousius committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    4f5fa2a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1481471 View commit details
    Browse the repository at this point in the history