Skip to content

[Unity][Transform] Memory plan across the IRModule#14220

Merged
tqchen merged 1 commit intoapache:unityfrom
MasterJH5574:unity-dev/2023-03-06-memory-plan-in-module
Mar 7, 2023
Merged

[Unity][Transform] Memory plan across the IRModule#14220
tqchen merged 1 commit intoapache:unityfrom
MasterJH5574:unity-dev/2023-03-06-memory-plan-in-module

Conversation

@MasterJH5574
Copy link
Copy Markdown
Contributor

Previously the static memory planning pass only works at single function level - each function inside the an IRModule will be independently planned. This is not perfect for the VM to reuse allocated memory across different functions.

Therefore, this PR turns the static memory planning pass into a module pass. Now the plan is done across the IRModule, so that memory alloation in different functions can share the same storage token when planning. With this PR, it is hopeful that the VM will find more opportunities of memory reuse.

Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented Mar 7, 2023

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 by @-ing them in a comment.

Generated by tvm-bot

1 similar comment
@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented Mar 7, 2023

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 by @-ing them in a comment.

Generated by tvm-bot

@tqchen tqchen merged commit 18472a7 into apache:unity Mar 7, 2023
tqchen pushed a commit that referenced this pull request Mar 13, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Mar 13, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Mar 13, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Mar 13, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Mar 20, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Apr 1, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Apr 1, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
tqchen pushed a commit that referenced this pull request Apr 1, 2023
Previously the static memory planning pass only works at single function
level - each function inside the an IRModule will be independently
planned. This is not perfect for the VM to reuse allocated memory across
different functions.

Therefore, this PR turns the static memory planning pass into a module
pass. Now the plan is done across the IRModule, so that memory alloation
in different functions can share the same storage token when planning.
With this PR, it is hopeful that the VM will find more opportunities of
memory reuse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants