You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "Lunderberg (via GitHub)" <gi...@apache.org> on 2023/10/02 15:06:07 UTC

[PR] [Unity][Bugfix] Check for trivial re-bindings in MatchCast nodes [tvm]

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

   The `KillAfterLastUse` pass that was implemented in https://github.com/apache/tvm/pull/15810 checked for trivial re-bindings in `VarBinding` nodes, but not in `MatchCast` nodes.  As a result, `CodeGenVM`'s de-duplication of registers resulted in the object being killed prematurely.
   
   ```python
   y = R.match_cast(x, R.Tensor(...)) # Trivial rebinding here.
                                      # CodeGenVM has these share a register.
   
   R.memory.kill_tensor(x)  # Kill x after last usage.
                            # Register is set to None.
   
   _ = R.ExternFunc("set_item")(y) # Use of the cleared register through y.
   ```


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


Re: [PR] [Unity][Bugfix] Check for trivial re-bindings in MatchCast nodes [tvm]

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

   Just hit the issue of `ValueError: Do not know how to handle type object`, fixed by this PR. Thanks.


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


Re: [PR] [Unity][Bugfix] Check for trivial re-bindings in MatchCast nodes [tvm]

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

   @junrushao This change should resolve the MLC-LLM error you found in https://github.com/apache/tvm/pull/15852.  It works in my local setup, and it would be good to validate that it works on your side 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


Re: [PR] [Unity][Bugfix] Check for trivial re-bindings in MatchCast nodes [tvm]

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


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