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 xnnpack delegate to label_image #36749
[tflite] add xnnpack delegate to label_image #36749
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some results you observe with XNNPack on label_image, to the PR description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Thanks!
As one last thing, could you update the README in examples/label_image, for other users to use the delegate?
Will approve once this change is in.
@freedomtan Can you please check srjoglekar246's comments and keep us posted? Thanks! |
@srjoglekar246 and @gbaned: thanks. I updated it. |
…omtan/tensorflow into add_xnnpack_to_label_image
…omtan/tensorflow into add_xnnpack_to_label_image
@gbaned Can you help get this in with the new change? |
I am not sure how it passed the presubmits, but it looks like the build on macos is now failing after this cl:
I will revert this for now. we can then look into why the presubmits here did not catch the problem. |
@gunan How do I reproduce the error? I guess some recent XNNPACK related changes broke it. With my |
@Maratyszcza FYI |
PiperOrigin-RevId: 301479850 Change-Id: I434b3dfd432ede55ea10b820f38f9af3173e9a41
I suspect the issue is due to Apple Clang lacking support for |
rebase and resubmit tensorflow#36749 to see if it works.
The XNNPACK Delegate uses XNNPACK, a fairly optimized floating point library, to run some inference operators (see the delegate's README for currently supported ops). With XNNPACK, I was able to get performance numbers similar to what @Maratyszcza described at XNNPACK's readme. I also got good numbers on Pixel 4 and Oppo Reno 3. Numbers on x86 machines are also good.
label_image -m MODEL_NAME -x 1 -c 50 -t 1
label_image -m MODEL_NAME -x 1 -c 50 -t NUMBER_OF_BIG_CORES