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] Determine block configs using the cascader #10695

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

ekalda
Copy link
Contributor

@ekalda ekalda commented Mar 21, 2022

The cascader needs to be able to choose the block config for operations in order to accurately model their performance.
The cascader must attach the chosen block config to the te.Schedule. This is done using a pragma. The chosen block config
is also added to the TIR spec. If the cascader hasn't set a block config, it defaults to the existing block config
selection behaviour.

Co-authored-by: Matthew Barrett [email protected]

The cascader needs to be able to choose the block config for operations in order to accurately model their performance.
 The cascader must attach the chosen block config to the te.Schedule. This is done using a pragma. The chosen block config
is also added to the TIR spec. If the cascader hasn't set a block config, it defaults to the existing block config
selection behaviour.

Co-authored-by: Matthew Barrett <[email protected]>
@ekalda
Copy link
Contributor Author

ekalda commented Mar 21, 2022

This PR is to supersede #10376 - so #10376 can be closed!

cc: @manupa-arm @lhutton1 @NicolaLancellotti

Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

Thanks @ekalda LGTM, just a couple of small things, feel free to address in a follow-up!

@@ -460,7 +460,7 @@ def pooling(x):
op = tf.nn.relu(op)
return op

_compare_tvm_with_tflite(pooling, [ifm_shape], accel_type)
_compare_tvm_with_tflite(pooling, [ifm_shape], accel_type, print_cmm=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: do we need to print this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think it can be removed!

@@ -14,6 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from numpy.core.shape_base import block
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: is this used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will remove!

Copy link
Contributor

@NicolaLancellotti NicolaLancellotti 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 Author

@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 for the review @lhutton1! Is it ok if I fix these in a follow up since the CI is green?

@@ -460,7 +460,7 @@ def pooling(x):
op = tf.nn.relu(op)
return op

_compare_tvm_with_tflite(pooling, [ifm_shape], accel_type)
_compare_tvm_with_tflite(pooling, [ifm_shape], accel_type, print_cmm=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think it can be removed!

@@ -14,6 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from numpy.core.shape_base import block
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will remove!

@lhutton1
Copy link
Contributor

Sure :)

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
Copy link
Contributor

manupak commented Mar 22, 2022

Thanks @mbaret @ekalda @lhutton1 @NicolaLancellotti !

ekalda added a commit to ekalda/tvm that referenced this pull request Mar 24, 2022
This is a follow up to apache#10695.

Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
ekalda added a commit to ekalda/tvm that referenced this pull request Mar 25, 2022
This is a follow up to apache#10695.

Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
manupak pushed a commit that referenced this pull request Mar 28, 2022
This is a follow up to #10695.

Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
@ekalda ekalda deleted the ethosu-cascader-integrate-block-config branch March 29, 2022 13:14
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
The cascader needs to be able to choose the block config for operations in order to accurately model their performance.
 The cascader must attach the chosen block config to the te.Schedule. This is done using a pragma. The chosen block config
is also added to the TIR spec. If the cascader hasn't set a block config, it defaults to the existing block config
selection behaviour.

Co-authored-by: Matthew Barrett <[email protected]>

Co-authored-by: Matthew Barrett <[email protected]>
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…0764)

This is a follow up to apache#10695.

Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
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.

4 participants