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/12/13 08:13:36 UTC

[GitHub] [tvm] masahi opened a new pull request, #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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

   https://github.com/apache/tvm/pull/13560 is supposed to change only the order in which buffers are visited, but the created `buffer_alloc_recorder_` misses buffers associated with `AllocateConst` nodes. These buffers appear only in `read` or `match_buffer` regions, so they are not caught by existing visitors for `BufferLoadNode` and `BufferStoreNode`.
   
   Since constant buffers are not correctly handled by `PlanAndUpdateBufferAllocationLocation` now, tuning on Hexagon is currently broken with this error. This PR fixes this.
   
   ```
   E             File "/home/fparizi/src/tvm_src/src/tir/transforms/plan_update_buffer_allocation_location.cc", line 163
   E           TVMError: 
   E           ---------------------------------------------------------------
   E           An error occurred during the execution of TVM.
   E           For more information, please see: https://tvm.apache.org/docs/errors.html
   E           ---------------------------------------------------------------
   E             Check failed: (buffer_data_to_buffer_.count(source_var)) is false:
   ```


-- 
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 #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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


-- 
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 commented on pull request #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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

   > BTW, Could you please add regression tests for Hexagon?
   
   Since we cannot parse a large constant via TVMScript, creating a TVMScript-based test case involving constant buffers (`AllocateConst`) is difficult or near impossible. But if there is a way to create TensorIR program directly from Relay (using `link-params=True` to generate `AllocateConst`), then I can probably create a minimum test case for `PlanAndUpdateBufferAllocationLocation`.  
   
   I think there is no way to create TensorIR from Relay (via `CreatePrimFunc`) directly in Python currently (everything is contained in `TECompiler`). But yes, Hexagon tuning keeps breaking due to `AllocateConst` not handled properly in PRs, so I'll try to fix this situation. 


-- 
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 #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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

   <!---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-->
    * cc @Hzfengsy, @junrushao <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 #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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

   I'm sorry I missed this when reviewing https://github.com/apache/tvm/pull/13560. 
   
   BTW, Could you please add regression tests for Hexagon? Then we can make sure the const tensors can be considered in every PR.


-- 
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 commented on pull request #13605: [TIR] Fix PlanAndUpdateBufferAllocationLocation not visiting constant buffer

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

   Regression test is added in https://github.com/apache/tvm/pull/13606


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