-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[microNPU] Determine block configs using the cascader #10695
Conversation
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]>
There was a problem hiding this 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this 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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove!
Sure :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @mbaret @ekalda @lhutton1 @NicolaLancellotti ! |
This is a follow up to apache#10695. Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
This is a follow up to apache#10695. Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
This is a follow up to #10695. Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
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]>
…0764) This is a follow up to apache#10695. Change-Id: I7f2dc14826cefea81fe5ff69c6255cdb5dc7f5c0
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]