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

[GitHub] [tvm] lightzhan-intellif opened a new pull request, #14693: fix buffer slice access bug.

lightzhan-intellif opened a new pull request, #14693:
URL: https://github.com/apache/tvm/pull/14693

   This PR tries to fix a bug, which will case the error:
   ```
   error: unsupported operand type(s) for +: 'BufferRegion' and 'BufferRegion'
    --> /workspace/code_newest/tvm/private_test/test_meta_programming.py:40:12
       |  
    40 |    B[0:5] = A[0:5] + B[0:5]
       |             ^^^^^^^^^^^^^^^
   ```
   The problem will occur when it is a binary operation between two BufferSlice accesses, because the parser do not know how to deal with it.
   
   This PR solves this by adding corresponding ops to `BufferRegion`. Any further suggestion is welcomed!
   
   @junrushao @Hzfengsy @wrongtest-intellif 


-- 
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] ekalda commented on pull request #14693: [TIR] Enhance TVMScript Buffer Slice Access

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

   Thanks @lightzhan-intellif for the fix! I think it would be good to also test that the scripted output of `VectorizeLoop` can be parsed as this is something that is currently broken and that this change should fix as well. 


-- 
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 #14693: fix buffer slice access bug.

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

   <!---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 auto-tag found, no teams are specified in PR title <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] Hzfengsy commented on pull request #14693: [TIR] Enhance TVMScript Buffer Slice Access

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

   cc @cyx-6 


-- 
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] lightzhan-intellif commented on pull request #14693: [TIR] Enhance TVMScript Buffer Slice Access

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

   > Thanks @lightzhan-intellif for the fix! I think it would be good to also test that the scripted output of `VectorizeLoop` can be parsed as this is something that is currently broken and that this change should fix as well.
   
   Thanks for your suggestion, I will have a look.


-- 
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] Hzfengsy merged pull request #14693: [TIR] Enhance TVMScript Buffer Slice Access

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


-- 
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] Hzfengsy commented on a diff in pull request #14693: [TIR] Enhance TVMScript Buffer Slice Access

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy commented on code in PR #14693:
URL: https://github.com/apache/tvm/pull/14693#discussion_r1173645372


##########
python/tvm/tir/stmt.py:
##########
@@ -536,6 +536,12 @@ class BufferRegion(Object, Scriptable):
     def __init__(self, buffer: Buffer, region: List[Range]):
         self.__init_handle_by_constructor__(_ffi_api.BufferRegion, buffer, region)  # type: ignore
 
+    def __eq__(self, other):

Review Comment:
   Not sure if it's safe. I tried doing similar things in Relax operators, but it may influence the behavior of `StructualEqual`, see  https://github.com/apache/tvm/blob/8569b9fe632b9488978bede30e169d457aafd8c9/python/tvm/relax/expr.py#L152



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