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

Make a TFLite test case run on big-endian machines #34590

Merged
merged 4 commits into from
Apr 29, 2020

Conversation

frreiss
Copy link
Contributor

@frreiss frreiss commented Nov 25, 2019

The test case BasicInterpreter.ThreeStepAllocate in /tensorflow/lite/interpreter_test.cc uses an array of little-endian binary data as one of its inputs. The little-endian data prevents this test from working properly on big-endian machines.

This pull request replaces the array of little-endian data with a struct, so that the embedded 32-bit fields will be in little-endian format on little-endian machines and in big-endian format on big-endian machines. After this change, the test case passes on both little-endian and big-endian machines.

@tensorflow-bot tensorflow-bot bot added the size:S CL Change Size: Small label Nov 25, 2019
@frreiss
Copy link
Contributor Author

frreiss commented Nov 25, 2019

Found a second test case in /tensorflow/lite/string_util_test.cc with the same issue and pushed a second commit to this branch to fix that test case too.

@gbaned gbaned self-assigned this Nov 26, 2019
@gbaned gbaned added the comp:lite TF Lite related issues label Nov 26, 2019
@gbaned gbaned added the awaiting review Pull request awaiting review label Nov 29, 2019
@gbaned
Copy link
Contributor

gbaned commented Jan 8, 2020

@frreiss Can you please resolve conflicts? Thanks!

@gbaned gbaned added stat:awaiting response Status - Awaiting response from author and removed awaiting review Pull request awaiting review labels Jan 8, 2020
@frreiss
Copy link
Contributor Author

frreiss commented Jan 16, 2020

Conflicts resolved.

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jan 16, 2020
@gbaned gbaned added the awaiting review Pull request awaiting review label Jan 17, 2020
@gbaned
Copy link
Contributor

gbaned commented Mar 5, 2020

@nutsiepully Can you please take a look on this PR? Thanks!

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 27, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 27, 2020
@gbaned gbaned added ready to pull PR ready for merge process and removed awaiting review Pull request awaiting review ready to pull PR ready for merge process labels Apr 28, 2020
@tensorflow-copybara tensorflow-copybara merged commit 80db9e2 into tensorflow:master Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes comp:lite TF Lite related issues ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants