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/12 21:39:34 UTC

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

tkonolige opened a new pull request #6910:
URL: https://github.com/apache/incubator-tvm/pull/6910


   This PR flows span information from tvmscript through to tir nodes. It also modifies many of the tir construction functions to accept a span.
   
   @spectrometerHBH @junrushao1994 @tqchen 


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6910:
URL: https://github.com/apache/incubator-tvm/pull/6910#discussion_r525552389



##########
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:
       do we have to pass in span? or can it be optionally passed in here




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



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

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6910:
URL: https://github.com/apache/incubator-tvm/pull/6910#discussion_r525579597



##########
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:
       OK sounds good, in most cases we are using constructor instead of make_node so hopefully it won't be a problem




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