Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microNPU] Calculate memory pressure for microNPU external functions #11209

Merged
merged 3 commits into from
Jul 6, 2022

Conversation

lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented May 4, 2022

During the microNPU compilation stage, the "used_memory" annotations on external microNPU functions are read to determine a memory pressure value. This value is passed to the cascader to better approximate the memory available for the optimization.

Note: this PR relies on #11091 and #11208 so this PR also contains the contents of those PR's.

cc @Mousius @NicolaLancellotti @ekalda @manupa-arm

@github-actions github-actions bot requested a review from manupak May 4, 2022 10:33
During the microNPU compilation stage, the "used_memory" annotations on
external microNPU functions are read to determine a memory pressure
value. This value is passed to the cascader to better approximate the
memory available for the optimization.

Change-Id: I11a311b0005e785637014cb451f4aed96edcda26
Change-Id: I41acfc83f05b2204075edb99f86a0eecaba00f71
@lhutton1 lhutton1 marked this pull request as ready for review July 5, 2022 12:48
@lhutton1
Copy link
Contributor Author

lhutton1 commented Jul 5, 2022

This is now green :)

@manupak
Copy link
Contributor

manupak commented Jul 5, 2022

Thanks @lhutton1! broadly looks good.

Just one small thing -- can we add a full offload test case with and without I/O buffer re-use as these are more frequently occurring scenarios ?

@github-actions github-actions bot requested a review from Mousius July 6, 2022 11:03
Change-Id: If3e672d402ab237fa82e34761bb972d2e9483ba9
@lhutton1
Copy link
Contributor Author

lhutton1 commented Jul 6, 2022

Thanks for the review @manupa-arm, I added the test cases!

Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@manupak manupak merged commit cfe8318 into apache:main Jul 6, 2022
@manupak
Copy link
Contributor

manupak commented Jul 6, 2022

Thanks @lhutton1 ! this is merged now!

blackkker pushed a commit to blackkker/tvm that referenced this pull request Jul 7, 2022
…pache#11209)

* [microNPU] Calculate memory pressure for microNPU external functions

During the microNPU compilation stage, the "used_memory" annotations on
external microNPU functions are read to determine a memory pressure
value. This value is passed to the cascader to better approximate the
memory available for the optimization.

Change-Id: I11a311b0005e785637014cb451f4aed96edcda26

* fix get size from memory region

Change-Id: I41acfc83f05b2204075edb99f86a0eecaba00f71

* add test case for full offload

Change-Id: If3e672d402ab237fa82e34761bb972d2e9483ba9
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
…pache#11209)

* [microNPU] Calculate memory pressure for microNPU external functions

During the microNPU compilation stage, the "used_memory" annotations on
external microNPU functions are read to determine a memory pressure
value. This value is passed to the cascader to better approximate the
memory available for the optimization.

Change-Id: I11a311b0005e785637014cb451f4aed96edcda26

* fix get size from memory region

Change-Id: I41acfc83f05b2204075edb99f86a0eecaba00f71

* add test case for full offload

Change-Id: If3e672d402ab237fa82e34761bb972d2e9483ba9
@lhutton1 lhutton1 deleted the mem-pressure branch August 5, 2022 15:25
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
…pache#11209)

* [microNPU] Calculate memory pressure for microNPU external functions

During the microNPU compilation stage, the "used_memory" annotations on
external microNPU functions are read to determine a memory pressure
value. This value is passed to the cascader to better approximate the
memory available for the optimization.

Change-Id: I11a311b0005e785637014cb451f4aed96edcda26

* fix get size from memory region

Change-Id: I41acfc83f05b2204075edb99f86a0eecaba00f71

* add test case for full offload

Change-Id: If3e672d402ab237fa82e34761bb972d2e9483ba9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants