You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/30 11:28:39 UTC

[GitHub] [tvm] ekalda commented on a change in pull request #7754: [PatternMatcher] Support matching tuples, call nodes, and functions with variable numbers of inputs

ekalda commented on a change in pull request #7754:
URL: https://github.com/apache/tvm/pull/7754#discussion_r604006798



##########
File path: src/relay/ir/dataflow_matcher.cc
##########
@@ -898,6 +932,11 @@ class PatternPartitioner : protected MixedModeMutator {
  public:
   Expr Partition(const DFPattern& pattern, const Expr& pre, const Map<String, ObjectRef>& attrs,
                  PackedFunc check) {
+    if (pattern.as<FunctionPatternNode>()) {
+      LOG(WARNING) << "Paritioning a Function that isn't called doesn't make sense, skipping"

Review comment:
       nit - Partitioning 

##########
File path: tests/python/relay/test_dataflow_pattern.py
##########
@@ -1375,6 +1392,63 @@ def test_partition_overused():
     assert pattern.partition(out) == out
 
 
+def test_partition_fuzzy_tuple():
+    x = relay.var("x")
+    y = relay.var("y")
+    z = x + y
+    tuple_pattern = is_tuple(None)

Review comment:
       Why the use of None? What would happen if the brackets were left empty (similarly to is_constant())? (Just asking for enlightenment) 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org