aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jared Duke <jdduke@google.com>2018-10-09 16:21:56 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-09 16:29:34 -0700
commit86777950480e10bc43b36facc478e2d706f23852 (patch)
tree808075c8225d075ec8f9ea19c6445b0b25177751
parentc98ffffcb4e0cc668c0ff7b73d51677a7eb7dcf4 (diff)
Internal change
PiperOrigin-RevId: 216442906
-rw-r--r--tensorflow/contrib/lite/build_def.bzl18
-rw-r--r--tensorflow/contrib/lite/testing/BUILD5
2 files changed, 11 insertions, 12 deletions
diff --git a/tensorflow/contrib/lite/build_def.bzl b/tensorflow/contrib/lite/build_def.bzl
index 05efee18e7..f962a138f7 100644
--- a/tensorflow/contrib/lite/build_def.bzl
+++ b/tensorflow/contrib/lite/build_def.bzl
@@ -310,15 +310,8 @@ def generated_test_models_failing(conversion_mode):
if conversion_mode == "toco-flex":
# TODO(b/117328698): Fix and enable the known flex failures.
return [
- "arg_min_max",
- "div",
- "floor_div",
- "gather",
"lstm",
- "resize_bilinear",
- "space_to_batch_nd",
"split",
- "transpose",
"unpack",
]
@@ -334,7 +327,8 @@ def generated_test_models_all():
"""Generates a list of all tests with the different converters.
Returns:
- List of tuples representing (conversion mode, name of test).
+ List of tuples representing:
+ (conversion mode, name of test, test tags, test args).
"""
conversion_modes = generated_test_conversion_modes()
tests = generated_test_models()
@@ -343,12 +337,18 @@ def generated_test_models_all():
failing_tests = generated_test_models_failing(conversion_mode)
for test in tests:
tags = []
+ args = []
if test in failing_tests:
tags.append("notap")
tags.append("manual")
if conversion_mode:
test += "_%s" % conversion_mode
- options.append((conversion_mode, test, tags))
+
+ # Flex conversion shouldn't suffer from the same conversion bugs
+ # listed for the default TFLite kernel backend.
+ if conversion_mode == "toco-flex":
+ args.append("--ignore_known_bugs=false")
+ options.append((conversion_mode, test, tags, args))
return options
def gen_zip_test(name, test_name, conversion_mode, **kwargs):
diff --git a/tensorflow/contrib/lite/testing/BUILD b/tensorflow/contrib/lite/testing/BUILD
index 2edd420fea..3dc666f631 100644
--- a/tensorflow/contrib/lite/testing/BUILD
+++ b/tensorflow/contrib/lite/testing/BUILD
@@ -20,8 +20,7 @@ load(
name = "zip_test_%s" % test_name,
size = "large",
srcs = ["generated_examples_zip_test.cc"],
- args = [
- ] + select({
+ args = args + select({
"//tensorflow:android": [],
"//conditions:default": [
"--zip_file_path=$(location :zip_%s)" % test_name,
@@ -61,7 +60,7 @@ load(
"//tensorflow/core:android_tensorflow_test_lib",
],
}),
-) for conversion_mode, test_name, tags in generated_test_models_all()]
+) for conversion_mode, test_name, tags, args in generated_test_models_all()]
test_suite(
name = "generated_zip_tests",