[microNPU] Improve cascader memory transfer estimates#10508
Merged
manupak merged 1 commit intoapache:mainfrom Mar 14, 2022
Merged
[microNPU] Improve cascader memory transfer estimates#10508manupak merged 1 commit intoapache:mainfrom
manupak merged 1 commit intoapache:mainfrom
Conversation
Change-Id: Idadc5f354dce42c8dbcdcbe281d324adddb41ba3
Contributor
Author
This was referenced Mar 7, 2022
Contributor
|
@ekalda would be able to take a look here ? |
ekalda
reviewed
Mar 9, 2022
Contributor
ekalda
left a comment
There was a problem hiding this comment.
LGTM! Some nits, can be done in a follow up :)
Comment on lines
+67
to
+69
| read_latency: int = 0, | ||
| write_latency: int = 0, | ||
| burst_length: int = 1, |
Contributor
There was a problem hiding this comment.
Nit: add these to the docstring as well
| int read_bandwidth; | ||
| /*! \brief The write bandwidth of the region in bytes per cycle */ | ||
| int write_bandwidth; | ||
| /*! \brief The read bandwidth of the region in bytes per cycle */ |
| output_cycles *= reduce(lambda a, b: a * b, output_block, 1) | ||
| output_cycles = int(math.ceil(output_cycles)) | ||
| block_config.append(BlockConfig(output_block, 0, output_cycles)) | ||
| block_config.append(BlockConfig(output_block, output_block, 0, output_cycles)) |
Contributor
There was a problem hiding this comment.
Maybe use the larger of the input blocks?
Comment on lines
+366
to
+367
| int read_cycles = bytes_transferred * home_region->read_bandwidth + | ||
| input_configs[i]->GetHomeRegion()->read_latency; |
Contributor
There was a problem hiding this comment.
nit:
Suggested change
| int read_cycles = bytes_transferred * home_region->read_bandwidth + | |
| input_configs[i]->GetHomeRegion()->read_latency; | |
| int read_cycles = bytes_transferred * home_region->read_bandwidth + | |
| home_region->read_latency; |
manupak
approved these changes
Mar 14, 2022
Contributor
manupak
left a comment
There was a problem hiding this comment.
Lets take it in a follow up :)
Contributor
|
Thanks @ekalda @jacobbohlin ! this is merged now. |
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
Change-Id: Idadc5f354dce42c8dbcdcbe281d324adddb41ba3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves the cascader's memory transfer cycle estimates by taking memory burst length and latency into account. Copying tensors between external memories are also more accurately modeled.