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 to int16 data type in TFLite frontend #10915

Merged
merged 2 commits into from
May 18, 2022

Conversation

leandron
Copy link
Contributor

@leandron leandron commented Apr 6, 2022

Add support for int16 data type and int64 biases/accumulators in the TFLite frontend. Adjusts TFLite tests to cover int16 convolutions and element-wise; Fixes a minor typo negtive->negative in the element-wise tests.

cc @lhutton1 @NicolaLancellotti @ekalda @masahi for reviews

Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

Thanks @leandron, looks good to me!

tests/python/frontend/tflite/test_forward.py Outdated Show resolved Hide resolved
Copy link
Contributor

@NicolaLancellotti NicolaLancellotti left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ekalda ekalda 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 adding the int16 support @leandron! Do you know if there any int16 models around by any chance we could test?

src/relay/qnn/op/convolution.cc Show resolved Hide resolved
Add support for int16 data type and int64 biases/accumulators in
the TFLite frontend.

Adjusts TFLite tests to cover int16 convolutions and element-wise;
Fixes a minor typo negtive->negative in the element-wise tests.
Copy link
Contributor

@ekalda ekalda 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 to me, few nits... Great job for getting int16 mobilenet and conv2d tests running, I think it's a really good improvement to our frontend infra!

src/relay/qnn/op/convolution.cc Outdated Show resolved Hide resolved
src/relay/qnn/op/convolution.cc Show resolved Hide resolved
tests/python/frontend/tflite/test_forward.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Thanks for all the work on this @leandron, LGTM! :)

src/relay/qnn/op/convolution.cc Show resolved Hide resolved
Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

Thanks @leandron LGTM! Just a couple of comments about testing but feel free to take in a follow up

tests/python/frontend/tflite/test_forward.py Show resolved Hide resolved
tests/python/frontend/tflite/test_forward.py Show resolved Hide resolved
tests/python/frontend/tflite/test_forward.py Show resolved Hide resolved
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
@lhutton1 lhutton1 merged commit f88a10f into apache:main May 18, 2022
@lhutton1
Copy link
Contributor

Thanks @leandron, @ekalda!

driazati pushed a commit to driazati/tvm that referenced this pull request May 18, 2022
)

* [TFLite] Add support to int16 data type in TFLite frontend

Add support for int16 data type and int64 biases/accumulators in
the TFLite frontend.

Adjusts TFLite tests to cover int16 convolutions and element-wise;
Fixes a minor typo negtive->negative in the element-wise tests.

* Update src/relay/qnn/op/convolution.cc

Co-authored-by: Elen Kalda <elen.kalda@arm.com>

Co-authored-by: Elen Kalda <elen.kalda@arm.com>
driazati pushed a commit to driazati/tvm that referenced this pull request May 18, 2022
)

* [TFLite] Add support to int16 data type in TFLite frontend

Add support for int16 data type and int64 biases/accumulators in
the TFLite frontend.

Adjusts TFLite tests to cover int16 convolutions and element-wise;
Fixes a minor typo negtive->negative in the element-wise tests.

* Update src/relay/qnn/op/convolution.cc

Co-authored-by: Elen Kalda <elen.kalda@arm.com>

Co-authored-by: Elen Kalda <elen.kalda@arm.com>
juda pushed a commit to juda/tvm that referenced this pull request Jun 21, 2022
)

* [TFLite] Add support to int16 data type in TFLite frontend

Add support for int16 data type and int64 biases/accumulators in
the TFLite frontend.

Adjusts TFLite tests to cover int16 convolutions and element-wise;
Fixes a minor typo negtive->negative in the element-wise tests.

* Update src/relay/qnn/op/convolution.cc

Co-authored-by: Elen Kalda <elen.kalda@arm.com>

Co-authored-by: Elen Kalda <elen.kalda@arm.com>
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.

4 participants