mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
add benchmark to Bazel build (#71412)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/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 11700dbc80200093fdd74b1be066b4e740cee516)
This commit is contained in:
parent
e9dfc61938
commit
4bf8a9b259
|
|
@ -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(
|
http_archive(
|
||||||
name = "pybind11_bazel",
|
name = "pybind11_bazel",
|
||||||
strip_prefix = "pybind11_bazel-7f397b5d2cc2434bbd651e096548f7b40c128044",
|
strip_prefix = "pybind11_bazel-7f397b5d2cc2434bbd651e096548f7b40c128044",
|
||||||
|
|
|
||||||
11
c10/benchmark/BUILD.bazel
Normal file
11
c10/benchmark/BUILD.bazel
Normal file
|
|
@ -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",
|
||||||
|
],
|
||||||
|
)
|
||||||
Loading…
Reference in New Issue
Block a user