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/09/29 14:18:25 UTC
[GitHub] [tvm] Lunderberg opened a new pull request, #15841: [Unity] Remove end-of-life handling from StaticPlanBlockMemory
Lunderberg opened a new pull request, #15841:
URL: https://github.com/apache/tvm/pull/15841
The catch-all in `relax.transform.KillAfterLastUse` can be used for releasing tensor/storage, not just those that were not previously handled. This simplifies the `StaticPlanBlockMemory` pass, as it does not need to track the location at which `R.memory.kill_storage` and `R.memory.kill_tensor` should be inserted.
--
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] Remove end-of-life handling from StaticPlanBlockMemory [tvm]
Posted by "junrushao (via GitHub)" <gi...@apache.org>.
junrushao merged PR #15841:
URL: https://github.com/apache/tvm/pull/15841
--
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] Remove end-of-life handling from StaticPlanBlockMemory [tvm]
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #15841:
URL: https://github.com/apache/tvm/pull/15841#issuecomment-1743515187
MasterJH5574 I'm not sure if that would be the best test cases to add, for a couple of reasons.
1. I fully expect there to be differences between the previous single-pass of `StaticPlanBlockMemory` and the new 2-pass sequence of `SPBM -> KillAfterLastUse`, due to cases that aren't handled by the static memory planning. (e.g. Failure to de-allocate buffers that are aliased using `R.reshape`, or dynamic buffers.)
2. Writing a test on the application of both passes in sequence assumes that the passes are used adjacently in the lowering flow. This is already not the case, as `RewriteCUDAGraph` and `LowerAllocTensor` occur between the two.
That said, I think it would be good to add tests verifying that the memory planning does still have the intended reduction of memory use. I think the best way to do this would be to monitor the allocations/deallocations and verifying that they occur in the correct order. The allocations could be captured by overriding `"vm.builtin.alloc_storage"`, but deallocations occur based on the reference-counter in `NDArray`. Do you know of a good way to capture/track those deallocations?
--
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 #15841: [Unity] Remove end-of-life handling from StaticPlanBlockMemory
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #15841:
URL: https://github.com/apache/tvm/pull/15841#issuecomment-1740970907
@vinx13 This contains some of the refactoring that was present in https://github.com/apache/tvm/pull/15839, but without the breaking changes to the `RewriteCUDAGraph` pass.
--
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] Remove end-of-life handling from StaticPlanBlockMemory [tvm]
Posted by "Lunderberg (via GitHub)" <gi...@apache.org>.
Lunderberg commented on PR #15841:
URL: https://github.com/apache/tvm/pull/15841#issuecomment-1777920653
Rebased onto current `unity`, as the CI results from three weeks ago are rather stale. Would appreciate reviews, to avoid the results going stale again.
--
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