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/09/01 08:15:04 UTC

[GitHub] [tvm] Hzfengsy opened a new pull request #8895: [TVMScript] Fix error reporting on Store

Hzfengsy opened a new pull request #8895:
URL: https://github.com/apache/tvm/pull/8895


   Reported by @vinx13.
   
   The error report after fix:
   ```
   error: Store is only allowed with one index, but 2 were provided.
    --> tests/python/unittest/test_tvmscript_error_report.py:390:15
        |
    390 |              B[i, j] = 1.0  # error: Store is only allowed with one index
        |                ^^^^
   ```
   
   cc @junrushao1994 @tkonolige 


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] vinx13 commented on pull request #8895: [TVMScript] Fix error reporting on Store

Posted by GitBox <gi...@apache.org>.
vinx13 commented on pull request #8895:
URL: https://github.com/apache/tvm/pull/8895#issuecomment-910445833


   Thanks for the fix!


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] vinx13 merged pull request #8895: [TVMScript] Fix error reporting on Store

Posted by GitBox <gi...@apache.org>.
vinx13 merged pull request #8895:
URL: https://github.com/apache/tvm/pull/8895


   


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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] tkonolige commented on a change in pull request #8895: [TVMScript] Fix error reporting on Store

Posted by GitBox <gi...@apache.org>.
tkonolige commented on a change in pull request #8895:
URL: https://github.com/apache/tvm/pull/8895#discussion_r700351297



##########
File path: python/tvm/script/parser.py
##########
@@ -536,7 +536,7 @@ def transform_SubscriptAssign(self, node):
             if len(indexes) != 1:
                 self.report_error(
                     f"Store is only allowed with one index, but {len(indexes)} were provided.",
-                    tvm.ir.Span.union([x.span for x in indexes]),
+                    node.params[1].span,

Review comment:
       ```suggestion
                       ast.Span.union([x.span for x in node.params]),
   ```
   
   You want the union of all the spans, not just the first one.




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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] tkonolige commented on a change in pull request #8895: [TVMScript] Fix error reporting on Store

Posted by GitBox <gi...@apache.org>.
tkonolige commented on a change in pull request #8895:
URL: https://github.com/apache/tvm/pull/8895#discussion_r700351297



##########
File path: python/tvm/script/parser.py
##########
@@ -536,7 +536,7 @@ def transform_SubscriptAssign(self, node):
             if len(indexes) != 1:
                 self.report_error(
                     f"Store is only allowed with one index, but {len(indexes)} were provided.",
-                    tvm.ir.Span.union([x.span for x in indexes]),
+                    node.params[1].span,

Review comment:
       ```suggestion
                       ast.Span.union([x.span for x in node.params[1:]]),
   ```
   
   You want the union of all the spans, not just the first one.




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

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

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