Skip to content

Commit

Permalink
Disable sqrt conversions tests
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 625394661
  • Loading branch information
carlos-guia authored and tensorflower-gardener committed Apr 16, 2024
1 parent fa1deac commit 94350b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion tensorflow/lite/testing/build_def.bzl
Expand Up @@ -283,7 +283,9 @@ def generated_test_models_failing(conversion_mode, delegate):
"while",
]
else:
return []
# TODO(b/335226678): New XNNPack vsqrt returns 0 instead of NaN in
# certain cases.
return ["sqrt"]

def generated_test_models_successful(conversion_mode, delegate):
"""Returns the list of successful test models.
Expand Down
17 changes: 10 additions & 7 deletions tensorflow/lite/testing/generated_examples_zip_test.cc
Expand Up @@ -72,13 +72,13 @@ using BrokenTestMap =
std::pair</* bug_number */ string, /* always_ignore */ bool>>;
// TODO(ahentz): make sure we clean this list up frequently.
const BrokenTestMap& GetKnownBrokenTests() {
static const BrokenTestMap* const kBrokenTests = new BrokenTestMap({
// TODO(b/194364155): TF and TFLite have different behaviors when output
// nan values in LocalResponseNorm ops.
{R"(^\/local_response_norm.*alpha=-3.*beta=2)", {"194364155", true}},
{R"(^\/local_response_norm.*alpha=(None|2).*beta=2.*bias=-0\.1.*depth_radius=(0|1).*input_shape=\[3,15,14,3\])",
{"194364155", true}},
});
static const BrokenTestMap* const kBrokenTests = new BrokenTestMap(
{// TODO(b/194364155): TF and TFLite have different behaviors when output
// nan values in LocalResponseNorm ops.
{R"(^\/local_response_norm.*alpha=-3.*beta=2)", {"194364155", true}},
{R"(^\/local_response_norm.*alpha=(None|2).*beta=2.*bias=-0\.1.*depth_radius=(0|1).*input_shape=\[3,15,14,3\])",
{"194364155", true}},
{R"(^\/sqrt.*)", {"335226678", true}}});
return *kBrokenTests;
}

Expand Down Expand Up @@ -295,6 +295,9 @@ TEST_P(OpsTest, RunZipTests) {
string bug_number;
bool always_ignore;
for (const auto& p : broken_tests) {
printf("zyx, %s %s %s %s\n", p.first.c_str(), test_name.c_str(),
p.second.first.c_str(),
RE2::PartialMatch(test_name, p.first) ? "yes" : "no");
if (RE2::PartialMatch(test_name, p.first)) {
std::tie(bug_number, always_ignore) = p.second;
break;
Expand Down

0 comments on commit 94350b8

Please sign in to comment.