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 2022/11/04 21:08:49 UTC

[GitHub] [tvm] masahi opened a new pull request, #13297: [TE] Make `elem_offset` of the buffers created by `te.extern` a variable to avoid crash

masahi opened a new pull request, #13297:
URL: https://github.com/apache/tvm/pull/13297

   Currently, when compiling MobileBERT on x86, we get a crash from https://github.com/apache/tvm/blob/11d22bdc1bd45d952eb140684e64f01438b7f516/src/tir/transforms/arg_binder.cc#L102-L106.
   
   This is caused from the subgraph attached in the test. Since https://github.com/apache/tvm/pull/11341, `concatenate` is implemented as a TE extern on x86. `te.extern(...)` doesn't explicitly set the `elem_offset` parameter of input / output buffers it creates, which ends up `elem_offset` of these buffers being the default value, 0. This causes a problem from the above check in `BindBuffer`, since the subgraph does create a non-zero `elem_offset` slice from a buffer whose `elem_offset` is set to zero. 
   
   Since we don't require buffers created in `te.extern(...)` to have zero `elem_offset`, we can avoid this problem by explicitly setting `elem_offset` to be a variable there. 
   
   


-- 
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] masahi merged pull request #13297: [TE] Make `elem_offset` of the buffers created by `te.extern` a variable to avoid crash

Posted by GitBox <gi...@apache.org>.
masahi merged PR #13297:
URL: https://github.com/apache/tvm/pull/13297


-- 
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] Lunderberg commented on pull request #13297: [TE] Make `elem_offset` of the buffers created by `te.extern` a variable to avoid crash

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13297:
URL: https://github.com/apache/tvm/pull/13297#issuecomment-1304538121

   LGTM, and thank you for making this change!  For context on the fix, this didn't cause an issue previously, because the default `elem_offset=0` could bind to an entire buffer.  It only became necessary when the buffer being bound as an argument to the `te.extern` was a view into a larger backing allocation, which could occur after inlining.


-- 
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 #13297: [TE] Make `elem_offset` of the buffers created by `te.extern` a variable to avoid crash

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13297:
URL: https://github.com/apache/tvm/pull/13297#issuecomment-1304262230

   <!---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: `te` <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