Skip to content

Conversation

@jacobbohlin
Copy link
Contributor

This PR fixes some bugs related to the microNPU performance model in the cascader.

  • Fixed incorrect num_blocks calculations for both BufferModes.
  • Fixed similar issues with Read/Write byte calculations.
  • Fixed an issue where the 'partkernel' flag was not propagated to the performance estimation code.
  • Fixed single buffering check incorrectly used output shape and block rather than the input shape and block.
  • Fixed block config not aligned to micro block for Elementwise.

This PR builds on and includes the changes in #10508 and will remain as a draft until that is merged.

@jacobbohlin
Copy link
Contributor Author

@jacobbohlin jacobbohlin force-pushed the cascader-perf-model-fixes branch from 3a54cf7 to 8745836 Compare March 18, 2022 14:58
@jacobbohlin jacobbohlin marked this pull request as ready for review March 18, 2022 14:59
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Thanks @jacobbohlin, one comment, otherwise looks good! :)

min(output_shape[2] * output_shape[4], self._max_block_shape.depth),
min(output_shape[3], self._max_block_shape.width),
_round_up(min(output_shape[1], max_height), self._micro_block.height),
min(output_shape[2] * output_shape[4], max_width),
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably shouldn't take min with max_width

* Fixed incorrect num_blocks calculations for both BufferModes.
* Fixed similar issues with Read/Write byte calculations.
* Fixed an issue where the 'partkernel' flag was not propagated to
  the performance estimation code.
* Fixed single buffering check incorrectly used output shape and
  block rather than the input shape and block.
* Fixed block config not aligned to micro block for Elementwise.

Change-Id: Ide6b231bc1a17c65bed20129d2179a215ada14b2
Changed incorrect usage of 'max_width' to 'max_depth'.
@jacobbohlin jacobbohlin force-pushed the cascader-perf-model-fixes branch 2 times, most recently from 3a54cf7 to 07e7603 Compare April 13, 2022 08:50
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

LGTM! :)

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 0b95780 into apache:main Apr 20, 2022
@manupak
Copy link
Contributor

manupak commented Apr 20, 2022

Thanks @jacobbohlin @ekalda !

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.

3 participants