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 2020/11/17 22:39:39 UTC

[GitHub] [incubator-tvm] tkonolige commented on a change in pull request #6910: [TVMSCRIPT] Attach span information to tir nodes in tvmscript

tkonolige commented on a change in pull request #6910:
URL: https://github.com/apache/incubator-tvm/pull/6910#discussion_r525572549



##########
File path: tests/python/unittest/test_node_reflection.py
##########
@@ -57,7 +57,7 @@ def test_make_smap():
 
 
 def test_make_node():
-    x = tvm.ir.make_node("IntImm", dtype="int32", value=10)
+    x = tvm.ir.make_node("IntImm", dtype="int32", value=10, span=None)

Review comment:
       Right now we have to pass in the span. The problem is that the ffi doesn't really allow for keyword arguments. We can fake them by using optional arguments, but this fails when there are multiple optional arguments. I opted for making things consistent, so I don't allow optional spans at the ffi barrier. Instead, the optional spans are handled by the python wrapper functions. Unfortunately, this approach means that make_node needs to explicitly pass the span.




----------------------------------------------------------------
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