Skip to content

Commit

Permalink
add benchmark to Bazel build (pytorch#71412)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#71412

This is only in CMake and internal builds right now. Add to Bazel for
parity.
ghstack-source-id: 150235094

Test Plan: Built and ran locally. Rely on CI to verify.

Reviewed By: malfet

Differential Revision: D33635743

fbshipit-source-id: b9e5abbef5feabd52c53a9c2b95713b87ce81681
(cherry picked from commit 11700db)
  • Loading branch information
mikey dagitses authored and pytorchmergebot committed Mar 2, 2022
1 parent e9dfc61 commit 4bf8a9b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ http_archive(
],
)

http_archive(
name = "google_benchmark",
sha256 = "6132883bc8c9b0df5375b16ab520fac1a85dc9e4cf5be59480448ece74b278d4",
strip_prefix = "benchmark-1.6.1/",
urls = ["https://github.com/google/benchmark/archive/refs/tags/v1.6.1.tar.gz"],
)

http_archive(
name = "pybind11_bazel",
strip_prefix = "pybind11_bazel-7f397b5d2cc2434bbd651e096548f7b40c128044",
Expand Down
11 changes: 11 additions & 0 deletions c10/benchmark/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "intrusive_ptr",
srcs = ["intrusive_ptr_benchmark.cpp"],
tags = ["benchmark"],
deps = [
"//c10/util:base",
"@google_benchmark//:benchmark",
],
)

0 comments on commit 4bf8a9b

Please sign in to comment.