diff --git a/tensorflow/lite/kernels/BUILD b/tensorflow/lite/kernels/BUILD index 9f2786de09c..2fffccd984b 100644 --- a/tensorflow/lite/kernels/BUILD +++ b/tensorflow/lite/kernels/BUILD @@ -283,6 +283,7 @@ cc_test( cc_library( name = "tflite_with_ruy_enabled", + compatible_with = get_compatible_with_portable(), defines = ["TFLITE_WITH_RUY"], visibility = ["//visibility:private"], ) @@ -314,6 +315,7 @@ cc_library( cc_library( name = "tflite_with_ruy", + compatible_with = get_compatible_with_portable(), deps = select({ ":tflite_with_ruy_explicit_true": [":tflite_with_ruy_enabled"], ":tflite_with_ruy_explicit_false": [], @@ -329,6 +331,7 @@ cc_library( hdrs = [ "cpu_backend_context.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":tflite_with_ruy", @@ -348,6 +351,7 @@ cc_library( hdrs = [ "cpu_backend_threadpool.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":cpu_backend_context", @@ -387,6 +391,7 @@ cc_library( "cpu_backend_gemm_params.h", "cpu_backend_gemm_ruy.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":tflite_with_ruy", @@ -500,6 +505,7 @@ cc_library( name = "padding", srcs = [], hdrs = ["padding.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ "//tensorflow/lite/c:common", @@ -643,6 +649,7 @@ cc_library( hdrs = [ "dequantize.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts() + tf_opts_nortti_if_android() + EXTRA_EIGEN_COPTS, visibility = ["//visibility:private"], deps = BUILTIN_KERNEL_DEPS + [ @@ -730,6 +737,7 @@ cc_library( name = "lstm_eval", srcs = ["lstm_eval.cc"], hdrs = ["lstm_eval.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":cpu_backend_context", @@ -748,6 +756,7 @@ cc_library( cc_library( name = "lstm_shared", hdrs = ["lstm_shared.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), ) @@ -783,6 +792,7 @@ cc_library( "fully_connected.h", "register.h", ], + compatible_with = get_compatible_with_portable(), deps = [ ":builtin_op_kernels", "//tensorflow/lite:framework_lib", diff --git a/tensorflow/lite/kernels/internal/BUILD b/tensorflow/lite/kernels/internal/BUILD index 5854fc03d5b..4d4ea84685e 100644 --- a/tensorflow/lite/kernels/internal/BUILD +++ b/tensorflow/lite/kernels/internal/BUILD @@ -222,6 +222,7 @@ cc_library( name = "common", srcs = [], hdrs = ["common.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":cppmath", @@ -256,6 +257,7 @@ cc_library( "optimized/optimized_ops.h", "optimized/sparse_ops/fully_connected.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":common", @@ -411,6 +413,7 @@ cc_library( hdrs = [ "transpose_utils.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":types", @@ -432,6 +435,7 @@ cc_library( hdrs = [ "strided_slice_logic.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":compatibility", @@ -499,6 +503,7 @@ cc_library( "reference/sparse_ops/fully_connected.h", ], }), + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":common", @@ -651,6 +656,7 @@ cc_library( "reference/portable_tensor_utils.h", "reference/portable_tensor_utils_impl.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":common", @@ -671,6 +677,7 @@ cc_library( "optimized/neon_tensor_utils.h", "optimized/neon_tensor_utils_impl.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts() + NEON_FLAGS_IF_APPLICABLE + HARD_FP_FLAGS_IF_APPLICABLE, deps = [ ":common", @@ -695,6 +702,7 @@ cc_library( "optimized/sse_tensor_utils.h", "optimized/sse_tensor_utils_impl.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ ":cpu_check", @@ -712,6 +720,7 @@ cc_library( name = "kernel_utils", srcs = ["kernel_utils.cc"], hdrs = ["kernel_utils.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts() + micro_copts(), deps = [ ":tensor_utils", @@ -734,6 +743,7 @@ cc_library( "mfcc_mel_filterbank.h", "spectrogram.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ "//third_party/fft2d:fft2d_headers", @@ -749,6 +759,7 @@ cc_library( hdrs = [ "tensor_utils.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts() + NEON_FLAGS_IF_APPLICABLE, deps = [ ":cpu_check", @@ -1042,6 +1053,7 @@ cc_library( "optimized/neon_check.h", "optimized/sse_check.h", ], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = select({ ":haswell": tflite_deps_intel, diff --git a/tensorflow/lite/tools/optimize/sparsity/BUILD b/tensorflow/lite/tools/optimize/sparsity/BUILD index 7f2d880ff48..9bceb585826 100644 --- a/tensorflow/lite/tools/optimize/sparsity/BUILD +++ b/tensorflow/lite/tools/optimize/sparsity/BUILD @@ -1,4 +1,5 @@ load("//tensorflow/lite:build_def.bzl", "tflite_copts") +load("//tensorflow:tensorflow.bzl", "get_compatible_with_portable") package( default_visibility = [ @@ -11,6 +12,7 @@ cc_library( name = "format_converter", srcs = ["format_converter.cc"], hdrs = ["format_converter.h"], + compatible_with = get_compatible_with_portable(), copts = tflite_copts(), deps = [ "//tensorflow/lite/c:common",