diff options
author | Benoit Jacob <benoitjacob@google.com> | 2019-07-16 18:36:30 +0300 |
---|---|---|
committer | Benoit Jacob <benoitjacob@google.com> | 2020-03-10 23:33:11 +0300 |
commit | 78ea2fee2c53a5fea810f5aa7c216946c6c316b4 (patch) | |
tree | bfa3a30ffaa4df2cf474c0b5c10017582d252076 /BUILD | |
parent | 70d60076764bc90347841597feb2876115f56141 (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-- | BUILD | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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(), ) |