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

TensorFlow Lite Evaluation Tools CMake Compilation #53691

Closed

Conversation

madaosik
Copy link
Contributor

@madaosik madaosik commented Jan 7, 2022

This PR introduces into CMake configuration of TF Lite the option to automatically (cross-)compile TF Lite evaluation tools (specifically ImageNet Image Classification, COCO Object Detection and Indifference Diff).

Similarly to TF Lite kernel tests cross-compilation requiring host flatc compiler, cross-compilation of evaluation tools requires host protoc compiler. Therefore, the CMake configuration for obtaining flatc has been extended and abstracted into the native_tools CMake module.

For details please see the updated build_cmake.md file.

@google-ml-butler google-ml-butler bot added the size:L CL Change Size: Large label Jan 7, 2022
@gbaned gbaned added the comp:lite TF Lite related issues label Jan 7, 2022
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Jan 7, 2022
@gbaned gbaned requested a review from miaout17 January 7, 2022 14:23
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label Jan 7, 2022
@miaout17 miaout17 requested review from terryheo and removed request for miaout17 January 7, 2022 22:32
@miaout17
Copy link
Contributor

miaout17 commented Jan 7, 2022

@terryheo Could you help to review CMake related changes?

Copy link
Member

@terryheo terryheo 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 your contribution.

tensorflow/lite/g3doc/guide/build_cmake.md Outdated Show resolved Hide resolved
tensorflow/lite/g3doc/guide/build_cmake.md Outdated Show resolved Hide resolved
tensorflow/lite/kernels/CMakeLists.txt Outdated Show resolved Hide resolved
tensorflow/lite/tools/cmake/native_tools/CMakeLists.txt Outdated Show resolved Hide resolved
tensorflow/lite/tools/cmake/modules/Findprotobuf.cmake Outdated Show resolved Hide resolved
@terryheo terryheo changed the title TF Lite Evaluation Tools CMake Compilation TensorFlow Lite Evaluation Tools CMake Compilation Jan 12, 2022
@madaosik
Copy link
Contributor Author

@terryheo thanks for the review, I applied the necessary fixes and squashed the commits.

@gbaned gbaned requested a review from terryheo January 13, 2022 15:26
@tensorflowbutler tensorflowbutler removed the awaiting review Pull request awaiting review label Jan 17, 2022
@gbaned gbaned requested review from terryheo and removed request for terryheo February 22, 2022 12:20
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label Feb 22, 2022
@madaosik
Copy link
Contributor Author

@terryheo one outstanding conflict has just been resolved - any other update required? Thanks!

@gbaned
Copy link
Contributor

gbaned commented Apr 19, 2022

@terryheo Can you please review this PR ? Thank you!

'-DTFLITE_KERNEL_TEST=on' flag. Unit test cross-compilation specifics can be
found in the next subsection.
In order to build kernel tests and/or evaluation tools, you need to provide
`-DTFLITE_KERNEL_TEST=on`, `-DTFLITE_EVAL_TOOLS=on` flags, respectively. Cross-compilation specifics
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to build like benchmark_model and larbel_image without using TFLITE_KERNEL_TEST

https://www.tensorflow.org/lite/guide/build_cmake#step_6_build_tensorflow_lite_benchmark_tool_and_label_image_example_optional

Copy link
Contributor Author

@madaosik madaosik May 30, 2022

Choose a reason for hiding this comment

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

Hello @terryheo, you meant TFLITE_EVAL_TOOLS, not TFLITE_KERNEL_TEST, right? The latter is already a part of the master branch. Under this assumption I refactored the Evaluation Tools in the most recent commit to be built similarly to benchmark_model and label_image. Please let me know if there is anything else.

@gbaned gbaned removed the awaiting review Pull request awaiting review label Apr 20, 2022
@madaosik madaosik force-pushed the cmake-eval-tools-compilation branch from de04501 to 3765e43 Compare May 30, 2022 08:19
@gbaned gbaned requested a review from terryheo June 3, 2022 12:12
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label Jun 3, 2022
Copy link
Member

@terryheo terryheo left a comment

Choose a reason for hiding this comment

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

LGTM

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jun 17, 2022
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Jun 17, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jun 17, 2022
@tensorflowbutler tensorflowbutler removed the awaiting review Pull request awaiting review label Jun 19, 2022
@gbaned gbaned added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Jul 27, 2022
@gbaned
Copy link
Contributor

gbaned commented Aug 1, 2022

@madaosik Can you please resolve conflicts? Thank you!

@gbaned gbaned added awaiting review Pull request awaiting review stat:awaiting response Status - Awaiting response from author and removed ready to pull PR ready for merge process awaiting review Pull request awaiting review labels Aug 1, 2022
@gbaned
Copy link
Contributor

gbaned commented Aug 17, 2022

@madaosik Can you please resolve conflicts? Thank you!

1 similar comment
@gbaned
Copy link
Contributor

gbaned commented Sep 7, 2022

@madaosik Can you please resolve conflicts? Thank you!

@tensorflowbutler tensorflowbutler added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Sep 23, 2022
@gbaned
Copy link
Contributor

gbaned commented Oct 21, 2022

@madaosik Can you please resolve conflicts? Thank you!

@gbaned gbaned removed the stale This label marks the issue/pr stale - to be closed automatically if no activity label Oct 21, 2022
@tensorflowbutler tensorflowbutler added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Nov 18, 2022
@gbaned
Copy link
Contributor

gbaned commented Nov 24, 2022

Hi @madaosik I'm going to go ahead and close this PR, because it seems to have stalled. If you're still interested in pursing this (and responding to my comments), please feel free to reopen! Thank you!

@gbaned gbaned closed this Nov 24, 2022
PR Queue automation moved this from Approved by Reviewer to Closed/Rejected Nov 24, 2022
@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues size:L CL Change Size: Large stale This label marks the issue/pr stale - to be closed automatically if no activity
Projects
PR Queue
  
Closed/Rejected
Development

Successfully merging this pull request may close these issues.

None yet

6 participants