You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/17 08:44:44 UTC

[GitHub] [tvm] ekalda opened a new pull request, #11335: [microNPU] Fix bug in channels extraction in the matcher

ekalda opened a new pull request, #11335:
URL: https://github.com/apache/tvm/pull/11335

   If the input tensor layout is in NHCWB16, we were passing W value
   instead of the channels to get_valid_block_configs.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ekalda commented on a diff in pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
ekalda commented on code in PR #11335:
URL: https://github.com/apache/tvm/pull/11335#discussion_r875024546


##########
python/tvm/relay/backend/contrib/ethosu/te/pooling.py:
##########
@@ -239,8 +239,8 @@ def match_ethosu_pooling(output_tensor, device_config):
     ifm_dtype = input_tensors[0].dtype
     ofm_dtype = output_tensor.dtype
 
-    ifm_channels = int(input_tensors[0].shape[3])
-    ofm_channels = ifm_channels
+    # Use channels form a stage of TE graph where the IFM is always NHWC

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] manupa-arm commented on pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on PR #11335:
URL: https://github.com/apache/tvm/pull/11335#issuecomment-1130180380

   Thanks @ekalda @lhutton1 !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] manupa-arm merged pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
manupa-arm merged PR #11335:
URL: https://github.com/apache/tvm/pull/11335


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] lhutton1 commented on a diff in pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
lhutton1 commented on code in PR #11335:
URL: https://github.com/apache/tvm/pull/11335#discussion_r874598076


##########
python/tvm/relay/backend/contrib/ethosu/te/pooling.py:
##########
@@ -239,8 +239,8 @@ def match_ethosu_pooling(output_tensor, device_config):
     ifm_dtype = input_tensors[0].dtype
     ofm_dtype = output_tensor.dtype
 
-    ifm_channels = int(input_tensors[0].shape[3])
-    ofm_channels = ifm_channels
+    # Use channels form a stage of TE graph where the IFM is always NHWC

Review Comment:
   Nit: s/form/from



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ekalda commented on pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
ekalda commented on PR #11335:
URL: https://github.com/apache/tvm/pull/11335#issuecomment-1129071405

   Thanks for the review @lhutton1! There isn't a simple way to test it since the channels will be passed to the get_valid_block_configs and the channels value will factor into the cycle counts of all the valid block configs and we can't determine the value of channels from a chosen block config. In case of conv2d, the channels have an effect on the estimated cycle counts, so I added a test that checks the cycle count against a known good value (it is indeed radically different pre and post fix). In case of depthwise and pooling, when I look get_valid_block_configs more closely, it doesn't actually use the ifm_channels value for anything, so passing a wrong value wasn't really a problem :D I think it would be good to still pass the correct value as we might need it in the future. I have checked from the debugger that we indeed pass the correct values, I hope that is alright for the time being :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] ekalda commented on pull request #11335: [microNPU] Fix bug in channels extraction in the matcher

Posted by GitBox <gi...@apache.org>.
ekalda commented on PR #11335:
URL: https://github.com/apache/tvm/pull/11335#issuecomment-1128594303

   cc: @manupa-arm @NicolaLancellotti 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org