Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/ruy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorBenoit Jacob <benoitjacob@google.com>2019-07-16 18:36:30 +0300
committerBenoit Jacob <benoitjacob@google.com>2020-03-10 23:33:11 +0300
commit78ea2fee2c53a5fea810f5aa7c216946c6c316b4 (patch)
treebfa3a30ffaa4df2cf474c0b5c10017582d252076 /BUILD
parent70d60076764bc90347841597feb2876115f56141 (diff)
Fix performance regression (b/137615815) introduced by new platform
#defines - they were tested directly by #ifdef, and were being defined by path.h. As tune.cc did not #include path.h, it did not enable its platform-specific tuning code, resulting in a performance regression in cases relying on tuning for maximal performance --- in-order ARM. To prevent that from happening again, this moves the platform defines to a new platform.h and forces users to use a RUY_PLATFORM(X) function macro, so that if they fail to #include platform.h, they get a compilation error. PiperOrigin-RevId: 258372624
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD15
1 files changed, 14 insertions, 1 deletions
diff --git a/BUILD b/BUILD
index e92c64d..943311f 100644
--- a/BUILD
+++ b/BUILD
@@ -13,6 +13,11 @@ package(
)
cc_library(
+ name = "platform",
+ hdrs = ["platform.h"],
+)
+
+cc_library(
name = "check_macros",
hdrs = ["check_macros.h"],
deps = ["//third_party/tensorflow/lite/kernels/internal:compatibility"],
@@ -60,6 +65,7 @@ cc_library(
],
deps = [
":opt_set",
+ ":platform",
":time",
],
)
@@ -164,7 +170,10 @@ cc_library(
name = "path",
hdrs = ["path.h"],
visibility = ruy_visibility(),
- deps = [":size_util"],
+ deps = [
+ ":platform",
+ ":size_util",
+ ],
)
cc_library(
@@ -238,6 +247,7 @@ cc_library(
":matrix",
":opt_set",
":path",
+ ":platform",
],
)
@@ -255,6 +265,7 @@ cc_library(
":internal_matrix",
":opt_set",
":path",
+ ":platform",
":size_util",
":spec",
":tune",
@@ -276,6 +287,7 @@ cc_library(
":internal_matrix",
":opt_set",
":path",
+ ":platform",
":spec",
":tune",
"//third_party/gemmlowp:profiler",
@@ -371,6 +383,7 @@ cc_library(
":ruy",
":time",
"@com_google_googletest//:gtest",
+ ":platform",
] + ruy_test_ext_deps(),
)