[TIR][USMP] adding the pass to convert to pool offsets#9418
[TIR][USMP] adding the pass to convert to pool offsets#9418leandron merged 7 commits intoapache:mainfrom
Conversation
|
a friendly ping @mbs-octoml ! |
93a81d8 to
f95f642
Compare
|
Hi @manupa-arm, I was waiting for #8468 to go in and #9214 to come out of DRAFT. Is that ok? |
|
@mbs-octoml , yes Im also waiting for #8468 to go in :D -- so when #9214 comes out of draft it doesn't include changes belonging to #8468 |
f95f642 to
f2841f5
Compare
e5f1867 to
508b61d
Compare
|
Ping for reviews : @mbaret @mbs-octoml |
mbs-octoml
left a comment
There was a problem hiding this comment.
Thanks for including the comments. Made the mistake of looking at this late on a Fri afternoon and my eyes started glazing over, but seems the main things are the new load_node in the AllocateNode visitor and capturing AllocatedPoolInfo on func/global params.
I'm still finding my way in TIR land so defer to say @junrushao1994 or similar for proper review.
| ICHECK(body.defined()); | ||
| ICHECK_EQ(value.dtype(), var.dtype()); | ||
| auto vdtype = value.dtype(); | ||
| if (var->type_annotation.as<PointerTypeNode>()) { |
There was a problem hiding this comment.
could you add a comment? how did this ever work?
508b61d to
977608e
Compare
|
Thanks @mbs-octoml ! I've done the necessary changes. Pinging folks @lhutton1 @ekalda @leandron @NicolaLancellotti for review/approval |
lhutton1
left a comment
There was a problem hiding this comment.
Thanks @manupa-arm, I'm not all that familiar with USMP but gave this a quick look over. Just a few minor things - feel free to address them in a follow up.
tests/python/unittest/test_tir_usmp_transform_convert_pool_allocations_to_offsets.py
Outdated
Show resolved
Hide resolved
977608e to
52a4f12
Compare
|
Thanks! @NicolaLancellotti @lhutton1 . I've addressed your comments. |
This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0
* Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6
Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d
* fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1
* removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13
* rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc
* fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
9ce59ee to
2c6cf6c
Compare
|
@leandron can we get this in ? |
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
* [TIR][USMP] adding the pass to convert to pool offsets This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets. * adds two test cases for a linear structure with two pools * adds test case with a single pool for residual structures Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0 * [TIR][USMP] adding the pass to convert to pool offsets * Adding a toggle to produce TIR that is TVMScript printable for unit testing * Fixing the unit tests * Ensure deterministic pool variable ordering. Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6 * [TIR][USMP] adding the pass to convert to pool offsets Fixing the references after changes in the memory planning algorithm. Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d * [TIR][USMP] adding the pass to convert to pool offsets * fixing the lint Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1 * [TIR][USMP] adding the pass to convert to pool offsets * removing unnecessary defitinitions * remove global var map * adding explaination for let bindings to pointer type Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13 * [TIR][USMP] adding the pass to convert to pool offsets * rebase changes * making imports absolute * fixing typos and removing unnecesary lines Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc * [TIR][USMP] adding the pass to convert to pool offsets * fixing typos Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
This commit adds a transform pass that consumes the planned pool allocations using memory planning algorithm that convertes them to pool offsets.