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

[microTVM][Zephyr]Add project files for mlperftiny submission #13690

Merged
merged 5 commits into from
Jan 7, 2023

Conversation

mehrdadh
Copy link
Member

@mehrdadh mehrdadh commented Jan 4, 2023

This PR makes these changes:

  1. add source/header files for generating a zephyr project which is compatible with EEMBC runner for MLPerfTiny
  2. adjust microtvm_api_server.py and CMakeLists.template to support mlperftiny project type
  3. adds EEMBC api files from https://github.com/mlcommons/tiny in thirdparty/tiny.

This pull request was co-authored by @alanmacd, @mkatanbaf, @guberti and @areusch as part of our effort to submit to MLPerfTiny. You can find our submission results here: https://mlcommons.org/en/inference-tiny-10/

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jan 4, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

Copy link
Member

@guberti guberti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I've left a few nits, but this could be merged as-is. Thanks @mehrdadh!

3rdparty/mlperftiny/README.md Outdated Show resolved Hide resolved
#if TARGET_MODEL == 1 // KWS
g_input_data = static_cast<void*>(ee_get_buffer_pointer());
#elif TARGET_MODEL == 2 // VWW
int8_t* temp_int = reinterpret_cast<int8_t*>(ee_get_buffer_pointer());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clarify that this is converting uint8 to int8 values?

}

/**
* Inference without feature engineering. The inpput tensor is expected to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
* Inference without feature engineering. The inpput tensor is expected to
* Inference without feature engineering. The input tensor is expected to

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that needs to be fixed upstream.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I haven't changed the API files.

extern float g_quant_scale;
extern int8_t g_quant_zero;

void TVMRuntimeInit();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add doxygen comments for these functions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching this, I added documentation and fixed the header macros.

Copy link
Contributor

@alanmacd alanmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks for doing this.

@mehrdadh
Copy link
Member Author

mehrdadh commented Jan 6, 2023

@tvm-bot rerun

@mehrdadh mehrdadh merged commit 52d8485 into apache:main Jan 7, 2023
@mehrdadh mehrdadh deleted the micro/add_mlperf_project_api branch January 7, 2023 00:48
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
…#13690)

This PR makes these changes:
1. add source/header files for generating a zephyr project which is compatible with EEMBC runner for MLPerfTiny
2. adjust microtvm_api_server.py and CMakeLists.template to support `mlperftiny` project type
3. adds EEMBC api files from https://github.com/mlcommons/tiny in `thirdparty/tiny`.

This pull request was co-authored by @alanmacd, @mkatanbaf, @guberti and @areusch as part of our effort to submit to MLPerfTiny. You can find our submission results here: https://mlcommons.org/en/inference-tiny-10/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants