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

[Runtime][MISRA-C][Bundle] Bundle deployment with static linking #5158

Merged
merged 12 commits into from
Mar 30, 2020

Conversation

mehrdadh
Copy link
Member

Current implementation in MISRA-C bundle deployment depends on dynamic linker. This PR adds demo and test which does not rely on dynamic linking using dlopen function.

@tmoreau89
Copy link
Contributor

@liangfu @siju-samuel

apps/bundle_deploy/bundle.h Outdated Show resolved Hide resolved
apps/bundle_deploy/bundle_static.c Outdated Show resolved Hide resolved
demo: $(build_dir)/demo $(build_dir)/bundle.so $(build_dir)/bundle_c.so $(build_dir)/cat.bin
TVM_NUM_THREADS=1 $(build_dir)/demo $(build_dir)/bundle.so $(build_dir)/cat.bin
TVM_NUM_THREADS=1 $(build_dir)/demo $(build_dir)/bundle_c.so $(build_dir)/cat.bin
demo_dynamic: $(build_dir)/demo_dynamic $(build_dir)/bundle.so $(build_dir)/bundle_c.so $(build_dir)/cat.bin
Copy link
Member

Choose a reason for hiding this comment

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

apps/bundle_deploy/README.md needs to be updated?

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the README file. Please let me know if you have any suggestions.

apps/bundle_deploy/bundle.h Outdated Show resolved Hide resolved
apps/bundle_deploy/demo_static.c Outdated Show resolved Hide resolved
@tqchen
Copy link
Member

tqchen commented Mar 29, 2020

cc @liangfu

@liangfu
Copy link
Member

liangfu commented Mar 29, 2020 via email

apps/bundle_deploy/bundle_static.c Show resolved Hide resolved
demo: $(build_dir)/demo $(build_dir)/bundle.so $(build_dir)/bundle_c.so $(build_dir)/cat.bin
TVM_NUM_THREADS=1 $(build_dir)/demo $(build_dir)/bundle.so $(build_dir)/cat.bin
TVM_NUM_THREADS=1 $(build_dir)/demo $(build_dir)/bundle_c.so $(build_dir)/cat.bin
demo_dynamic: $(build_dir)/demo_dynamic $(build_dir)/bundle.so $(build_dir)/bundle_c.so $(build_dir)/cat.bin
Copy link
Member

Choose a reason for hiding this comment

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

update README.md to reflect this change.

Copy link
Member Author

@mehrdadh mehrdadh Mar 29, 2020

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

thanks @mehrdadhe the changes LGTM! Can you re-trigger the CI, there has been some issues with CI build due to some VTA re-factoring.

@mehrdadh
Copy link
Member Author

@tmoreau89 I have pushed a commit.

@tmoreau89 tmoreau89 merged commit 5a7d9a8 into apache:master Mar 30, 2020
@tmoreau89
Copy link
Contributor

Thank you @mehrdadhe @siju-samuel @liangfu! The PR has been merged!

@mehrdadh mehrdadh deleted the app_bundle branch March 30, 2020 15:57
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
…che#5158)

* test file for static link added

* rename files

* Fixed static linking issue

* cleanup

* changed to dynamic and static demo

* MISRA-C static and dynamic test

* cleanup

* cleanup

* Update README.md

* cleanup headers

* update readme
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Apr 17, 2020
…che#5158)

* test file for static link added

* rename files

* Fixed static linking issue

* cleanup

* changed to dynamic and static demo

* MISRA-C static and dynamic test

* cleanup

* cleanup

* Update README.md

* cleanup headers

* update readme
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