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

investigating TF lite SELECTIVE_REGISTRATION feature #76

Open
arashb opened this issue Oct 23, 2019 · 1 comment
Open

investigating TF lite SELECTIVE_REGISTRATION feature #76

arashb opened this issue Oct 23, 2019 · 1 comment
Labels
wont fix soon This will not be worked on

Comments

@arashb
Copy link
Contributor

arashb commented Oct 23, 2019

the feature SELECTIVE_REGISTRATION in TF Lite allows to create smaller TF lite library by only including the ops used in the converting model (see here). I couldn't find proper doc in the official TF lite guide though.

@arashb arashb changed the title investigating tensorflow lite SELECTIVE_REGISTRATION feature investigating TF lite SELECTIVE_REGISTRATION feature Oct 23, 2019
@Tombana
Copy link
Collaborator

Tombana commented Nov 8, 2019

So from what I understand, it works something like this:

There is the register.cc file which registers all the kernels. The way that we add our own kernel is by providing register_lqce.cc which includes our kernels.
Now the nice thing about a linker, is that when you do not register your kernel there, it will automatically detect that your Register_MyKernel() function is never called and it will remove that function from your final binary. So even if you compiled your MyKernel.cc file, it will just be removed at the end because it is seen as "unused".

So basically when you enable the selective registration feature, it generates a new register.cc file for you and it only calls the Register_XXX functions for those ops that are in your model. This way you get a binary that can only do your specific model or a subset of it.

So by providing our own register.cc file we are already kind-of using a system similar to this.

@arashb arashb added the wont fix soon This will not be worked on label Nov 11, 2019
lgeiger pushed a commit that referenced this issue Nov 13, 2020
Bumps [DoozyX/clang-format-lint-action](https://github.com/DoozyX/clang-format-lint-action) from v0.6 to v0.7.
- [Release notes](https://github.com/DoozyX/clang-format-lint-action/releases)
- [Commits](DoozyX/clang-format-lint-action@v0.6...d9291de)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wont fix soon This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants