From f56bda20cd67202d91510a3b8f504896b4b57922 Mon Sep 17 00:00:00 2001 From: Cody Yu Date: Mon, 23 Nov 2020 19:23:14 +0000 Subject: [PATCH] [PatternLang] Remove unnecessary check --- src/relay/ir/dataflow_matcher.cc | 2 -- tests/python/relay/test_dataflow_pattern.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/relay/ir/dataflow_matcher.cc b/src/relay/ir/dataflow_matcher.cc index 536e65979ee4..44b87633d208 100644 --- a/src/relay/ir/dataflow_matcher.cc +++ b/src/relay/ir/dataflow_matcher.cc @@ -643,8 +643,6 @@ class PatternGrouper { auto extractor = MatchExtractor(inputs); auto body = extractor.Mutate(expr); - // Verify the pattern still holds - ICHECK(DFPatternMatcher(body).Match(pattern_, body)); group.function = Function(params, body, NullValue(), Array()); group.name = extractor.GetName(); // Check to make sure we aren't overlapping with another group or creating an invalid fusion diff --git a/tests/python/relay/test_dataflow_pattern.py b/tests/python/relay/test_dataflow_pattern.py index 23c0f9366ad9..d4c169bc603e 100644 --- a/tests/python/relay/test_dataflow_pattern.py +++ b/tests/python/relay/test_dataflow_pattern.py @@ -1210,7 +1210,7 @@ def test_partition_overused(): def test_partition_check(): - pattern = is_op("nn.relu")(is_op("nn.conv2d")(wildcard(), wildcard())) + pattern = is_op("nn.relu")(is_op("nn.conv2d")(is_var("input"), wildcard())) def check(pre): return pre.args[0].attrs.data_layout == "NCHW"