You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "kparzysz-quic (via GitHub)" <gi...@apache.org> on 2023/08/04 12:51:00 UTC

[GitHub] [tvm] kparzysz-quic opened a new pull request, #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

kparzysz-quic opened a new pull request, #15483:
URL: https://github.com/apache/tvm/pull/15483

   The ast.ExtSlice expects a non-empty list, otherwise evaluation fails with `error: empty dims on ExtSlice`. Also, each element in "dims" list of ExtSlice must be either Slice or Index.
   
   In python3.8 an expression `A[()]` is parsed (by ast) as Subscript with slice being `Index(value=Tuple(elts=[]))`. When we translate a subscript from doc.AST to ast, we unconditionally convert every tuple to ast.ExtSlice, which in this case is incorrect.
   
   The fix is to map empty tuple back to the `Index(Tuple[]))` instead of ExtSlice. In other cases, ensure that members of ExtSlice are of correct types.


-- 
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] kparzysz-quic commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665703103

   This happens when we evaluate and expression containing `()`, specifically when it get translated back into ast and then passed to `eval`.  I encountered this while using macros, and I also thought it should happen without macros too, but I wasn't able to reproduce it with a simple testcase.  I can dig into this some more to see why it worked there, but failed in a macro.


-- 
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] kparzysz-quic commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665560481

   cc: @Hzfengsy @junrushao @yzh119 


-- 
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] tvm-bot commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665558812

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `script` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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] kparzysz-quic merged pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "kparzysz-quic (via GitHub)" <gi...@apache.org>.
kparzysz-quic merged PR #15483:
URL: https://github.com/apache/tvm/pull/15483


-- 
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] tvm-bot commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665558815

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `script` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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] junrushao commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665812626

   Interesting findings! When initiating TVMScript, we tested bunch of cases in certain python versions, but not all - which might be the source of such issues


-- 
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] tvm-bot commented on pull request #15483: [Script] Be more careful when generating ast.ExtSlice for Subscript

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15483:
URL: https://github.com/apache/tvm/pull/15483#issuecomment-1665558830

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * No users to tag found in teams: `script` <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


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