diff options
author | benoitjacob <benoitjacob@google.com> | 2020-04-02 06:52:45 +0300 |
---|---|---|
committer | Benoit Jacob <benoitjacob@google.com> | 2020-04-02 06:57:07 +0300 |
commit | 1652f4f96d12a78496fd8346bb7e26dfdfe8f88d (patch) | |
tree | 87e1f8b6371d24edbc99716cdae04154c2041684 | |
parent | 2b11bd49a84f8c3655b4ba14b420f5cc17782db4 (diff) |
Internal changetest_304319643
PiperOrigin-RevId: 304319643
-rw-r--r-- | ruy/build_defs.bzl | 22 | ||||
-rw-r--r-- | ruy/build_defs.bzl.opensource | 40 | ||||
-rw-r--r-- | ruy/profiler/BUILD | 8 | ||||
-rw-r--r-- | ruy/ruy_test_ext.bzl | 16 | ||||
-rw-r--r-- | ruy/ruy_test_ext.bzl.opensource | 7 |
5 files changed, 14 insertions, 79 deletions
diff --git a/ruy/build_defs.bzl b/ruy/build_defs.bzl index 964ede3..9bccccf 100644 --- a/ruy/build_defs.bzl +++ b/ruy/build_defs.bzl @@ -1,8 +1,4 @@ -"""Build definitions for Ruy. - -In some cases these are used to configure specific targets for -specific platforms, and dispatch is based on runtime capability detection. -""" +"""Build definitions for Ruy.""" # 1. Enable -mfpu=neon unconditionally on ARM32. If it turns out that we need to support # ARM32 without NEON then we'll implement runtime detection and dispatch at that point. @@ -21,17 +17,11 @@ def ruy_copts_base(): # Used for targets that are compiled with extra features that are skipped at runtime if unavailable. def ruy_copts_skylake(): - return select({ - ":x86_64": ["-march=skylake-avx512"], - "//conditions:default": [], - }) + return [] # Used for targets that are compiled with extra features that are skipped at runtime if unavailable. def ruy_copts_avx2(): - return select({ - ":x86_64": ["-mavx2", "-mfma"], - "//conditions:default": [], - }) + return [] # TODO(b/147376783): SSE 4.2 and AVX-VNNI support is incomplete / placeholder. # Optimization is not finished. In particular the dimensions of the kernel @@ -47,8 +37,4 @@ def ruy_copts_sse42(): # # Used for targets that are compiled with extra features that are skipped at runtime if unavailable. def ruy_copts_avxvnni(): - return select({ - # TODO(b/146494398): Reinstate flag, something like "-march=cascadelake". - ":x86_64": [], - "//conditions:default": [], - }) + return [] diff --git a/ruy/build_defs.bzl.opensource b/ruy/build_defs.bzl.opensource deleted file mode 100644 index 9bccccf..0000000 --- a/ruy/build_defs.bzl.opensource +++ /dev/null @@ -1,40 +0,0 @@ -"""Build definitions for Ruy.""" - -# 1. Enable -mfpu=neon unconditionally on ARM32. If it turns out that we need to support -# ARM32 without NEON then we'll implement runtime detection and dispatch at that point. -# 2. Explicitly pass -O3 on optimization configs where just "-c opt" means "optimize for code size". - -def ruy_copts_base(): - return select({ - ":armeabi-v7a": [ - "-mfpu=neon", - ], - "//conditions:default": [], - }) + select({ - ":optimized": ["-O3"], - "//conditions:default": [], - }) - -# Used for targets that are compiled with extra features that are skipped at runtime if unavailable. -def ruy_copts_skylake(): - return [] - -# Used for targets that are compiled with extra features that are skipped at runtime if unavailable. -def ruy_copts_avx2(): - return [] - -# TODO(b/147376783): SSE 4.2 and AVX-VNNI support is incomplete / placeholder. -# Optimization is not finished. In particular the dimensions of the kernel -# blocks can be changed as desired. -# -# Used for targets that are compiled with extra features that are skipped at runtime if unavailable. -def ruy_copts_sse42(): - return [] - -# TODO(b/147376783): SSE 4.2 and AVX-VNNI support is incomplete / placeholder. -# Optimization is not finished. In particular the dimensions of the kernel -# blocks can be changed as desired. -# -# Used for targets that are compiled with extra features that are skipped at runtime if unavailable. -def ruy_copts_avxvnni(): - return [] diff --git a/ruy/profiler/BUILD b/ruy/profiler/BUILD index b0af802..5e9d9bd 100644 --- a/ruy/profiler/BUILD +++ b/ruy/profiler/BUILD @@ -10,6 +10,14 @@ config_setting( define_values = {"ruy_profiler": "true"}, ) +# Used to build TFLite Micro RUY dependency for embedded targets outside of the +# RUY source tree. +filegroup( + name = "ruy_instrumentation_header", + srcs = ["instrumentation.h"], + visibility = ["//visibility:public"], +) + cc_library( name = "instrumentation", srcs = ["instrumentation.cc"], diff --git a/ruy/ruy_test_ext.bzl b/ruy/ruy_test_ext.bzl index 263121f..5701fff 100644 --- a/ruy/ruy_test_ext.bzl +++ b/ruy/ruy_test_ext.bzl @@ -1,19 +1,7 @@ """Allows to specialize the ruy BUILD to availability of external libraries""" def ruy_test_ext_defines(): - return select({ - "//tools/cc_target_os:windows": [], - "//tools/cc_target_os:wasm": [], - "//tools/cc_target_os:chromiumos": ["RUY_TESTING_ON_CHROMIUMOS"], - "//conditions:default": ["RUY_TEST_EXTERNAL_PATHS"], - }) + return [] def ruy_test_ext_deps(): - return select({ - "//tools/cc_target_os:windows": [], - "//conditions:default": [ - "//third_party/eigen3", - "//third_party/gemmlowp", - "//third_party/lapack:blas", - ], - }) + return [] diff --git a/ruy/ruy_test_ext.bzl.opensource b/ruy/ruy_test_ext.bzl.opensource deleted file mode 100644 index 5701fff..0000000 --- a/ruy/ruy_test_ext.bzl.opensource +++ /dev/null @@ -1,7 +0,0 @@ -"""Allows to specialize the ruy BUILD to availability of external libraries""" - -def ruy_test_ext_defines(): - return [] - -def ruy_test_ext_deps(): - return [] |