-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add benchmark for add op. #40059
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
Add benchmark for add op. #40059
Conversation
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit f1f40a1 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 15 times. |
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
at::Tensor a = at::rand({batchSize, channels}); | ||
at::Tensor b = at::rand({batchSize, channels}); | ||
at::Tensor c; | ||
for (auto _ : state) { |
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.
I'm not sure whether this runs, for a benchmark, the risk of getting optimized out considering the contents of this loop are invariant.
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.
You mean the entire loop is optimized away?
This is how you are supposed to use google benchmark it seems: https://github.com/google/benchmark. Also qnnpack benchmarks are similarly written.
Also the next PR in the stack has the result of running this benchmark. From that it does not seem to be case.
LGTM |
CAFFE2_USE_MSVC_STATIC_RUNTIME "Using MSVC static runtime libraries" ON | ||
"NOT BUILD_SHARED_LIBS" OFF) | ||
option(BUILD_TEST "Build C++ test binaries (need gtest and gbenchmark)" OFF) | ||
option(BUILD_MOBILE_BENCHMARKS "Build C++ test binaries for mobile (ARM) targets(need gtest and gbenchmark)" OFF) |
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.
space before (
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
Summary: This benchmark is added specifically for mobile to see if compiler is autovectorizing and thus we have no advantage of neon backend for vec256 for add op. Test Plan: CI Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D22055146](https://our.internmc.facebook.com/intern/diff/D22055146) [ghstack-poisoned]
This pull request has been merged in bddba1e. |
Stack from ghstack:
Summary:
This benchmark is added specifically for mobile to see if compiler is
autovectorizing and thus we have no advantage of neon backend for vec256
for add op.
Test Plan:
CI
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D22055146