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

[TFLite] add support for float16 #7093

Merged
merged 5 commits into from
Dec 21, 2020
Merged

[TFLite] add support for float16 #7093

merged 5 commits into from
Dec 21, 2020

Conversation

euntaik
Copy link
Contributor

@euntaik euntaik commented Dec 11, 2020

Add support for float16

TFLite converts float32 models to float16 models by introducing a Dequantize op in every op that contains a float32 values (weights, biases, and constants etc. ).
So conv2d op should account for the weights and bias as an input tensor instead of a weight value attached to itself.

@FrozenGene
Copy link
Member

It would be nice to supply testing.

@euntaik
Copy link
Contributor Author

euntaik commented Dec 14, 2020

I've added a test.

@euntaik
Copy link
Contributor Author

euntaik commented Dec 17, 2020

Is there something else I should fix or change?

@FrozenGene
Copy link
Member

FrozenGene commented Dec 17, 2020

@euntaik could your pr solve this issue #5823? If it could, we could associate this pr with that issue and close.

@giuseros could you have another round of look? Thanks!

Copy link
Contributor

@giuseros giuseros left a comment

Choose a reason for hiding this comment

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

I would just add the comments in the frontend code, and then it is good to go

python/tvm/relay/frontend/tflite.py Show resolved Hide resolved
Copy link
Contributor

@giuseros giuseros left a comment

Choose a reason for hiding this comment

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

Thanks @euntaik ! This LGTM now. @FrozenGene , please feel free to merge if it's ok for you as well

@FrozenGene
Copy link
Member

@euntaik Could you help to check your pr could solve issue #5823? IMO, your pr is enough.

@tqchen tqchen merged commit 9914685 into apache:main Dec 21, 2020
@tqchen
Copy link
Member

tqchen commented Dec 21, 2020

Thanks @euntaik @giuseros @FrozenGene !

masahi pushed a commit to masahi/tvm that referenced this pull request Dec 24, 2020
* [TFLite] add support for float16

* add testi case

* add test case

* add comments
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
* [TFLite] add support for float16

* add testi case

* add test case

* add comments
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
* [TFLite] add support for float16

* add testi case

* add test case

* add comments
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
* [TFLite] add support for float16

* add testi case

* add test case

* add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants