You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "zupengwang (via GitHub)" <gi...@apache.org> on 2026/08/28 15:38:24 UTC
[PR] [Fix][Relax] Preserve match-cast storage liveness [tvm]
zupengwang opened a new pull request, #20220:
URL: https://github.com/apache/tvm/pull/20220
Fixes #20190.
Fixes #20207.
`StaticPlanBlockMemory` propagates storage tokens through ordinary variable
bindings and lowered reshape/view operations, but not through `MatchCast`.
A `MatchCast` refines type information without allocating or copying storage,
so losing the token can make the planner release and reuse the source allocation
while the alias is still live. This causes silent wrong-code in the default
Relax pipeline.
This change propagates storage tokens through `MatchCast` bindings and adds a
regression test showing that the aliased allocation remains live until its
downstream use.
Tests:
- `python -m pytest -q tests/python/relax/test_transform_static_plan_block_memory.py`
(`29 passed`)
- `pre-commit run --files src/relax/transform/static_plan_block_memory.cc tests/python/relax/test_transform_static_plan_block_memory.py`
- End-to-end compiled-VM reproducers for #20190 and #20207, comparing NumPy
references before and after the patch
--
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: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org
Re: [PR] [Fix][Relax] Preserve match-cast storage liveness [tvm]
Posted by "tlopex (via GitHub)" <gi...@apache.org>.
tlopex merged PR #20220:
URL: https://github.com/apache/tvm/pull/20220
--
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: discuss-archive-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org