Skip to content

Commit

Permalink
[PatternLang] Remove unnecessary check (apache#6958)
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac authored and Trevor Morris committed Dec 4, 2020
1 parent dafcd9c commit 9fcb6ff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/relay/ir/dataflow_matcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type>(), Array<TypeVar>());
group.name = extractor.GetName();
// Check to make sure we aren't overlapping with another group or creating an invalid fusion
Expand Down
2 changes: 1 addition & 1 deletion tests/python/relay/test_dataflow_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9fcb6ff

Please sign in to comment.