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 2021/11/17 12:46:53 UTC

[GitHub] [tvm] lhutton1 opened a new pull request #9521: [microNPU] Support binary elementwise with non-4D inputs

lhutton1 opened a new pull request #9521:
URL: https://github.com/apache/tvm/pull/9521


   Reshapes non-4D inputs to become 4D, then reshapes the output back to
   the non-4D input shape.
   
   cc @ekalda @NicolaLancellotti @manupa-arm @dchauhan-arm
   


-- 
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 change in pull request #9521: [microNPU] Support binary elementwise with non-4D inputs

Posted by GitBox <gi...@apache.org>.
lhutton1 commented on a change in pull request #9521:
URL: https://github.com/apache/tvm/pull/9521#discussion_r753857217



##########
File path: python/tvm/relay/op/contrib/ethosu.py
##########
@@ -537,9 +538,14 @@ def is_valid(self):
         """
         if np.dtype(self.ofm) == np.int32 and self.activation is not None:

Review comment:
       I'm hoping I understood this correctly, lmk if not :)

##########
File path: tests/python/contrib/test_ethosu/test_codegen.py
##########
@@ -349,6 +349,7 @@ def representative_dataset():
         ([1, 2, 3, 4], [1, 2, 3, 4]),
         ([1, 2, 3, 4], [1, 1, 1, 1]),
         ([1, 1, 1, 1], [1, 2, 3, 4]),
+        ([1, 4, 4], [4, 1]),

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] ekalda commented on a change in pull request #9521: [microNPU] Support binary elementwise with non-4D inputs

Posted by GitBox <gi...@apache.org>.
ekalda commented on a change in pull request #9521:
URL: https://github.com/apache/tvm/pull/9521#discussion_r752112202



##########
File path: python/tvm/relay/op/contrib/ethosu.py
##########
@@ -537,9 +538,14 @@ def is_valid(self):
         """
         if np.dtype(self.ofm) == np.int32 and self.activation is not None:

Review comment:
       Does this mean that a graph with 32 bit OFMs will be offloaded (provided that there is no activation function)?

##########
File path: tests/python/contrib/test_ethosu/test_codegen.py
##########
@@ -349,6 +349,7 @@ def representative_dataset():
         ([1, 2, 3, 4], [1, 2, 3, 4]),
         ([1, 2, 3, 4], [1, 1, 1, 1]),
         ([1, 1, 1, 1], [1, 2, 3, 4]),
+        ([1, 4, 4], [4, 1]),

Review comment:
       Other cases worth testing are input shape that is less than 4D and the first dimension is not 1 and 2D and 1D IFMs




-- 
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 #9521: [microNPU] Support binary elementwise with non-4D inputs

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


   Thanks! @lhutton1 @NicolaLancellotti @ekalda 


-- 
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 change in pull request #9521: [microNPU] Support binary elementwise with non-4D inputs

Posted by GitBox <gi...@apache.org>.
lhutton1 commented on a change in pull request #9521:
URL: https://github.com/apache/tvm/pull/9521#discussion_r752149533



##########
File path: python/tvm/relay/op/contrib/ethosu.py
##########
@@ -537,9 +538,14 @@ def is_valid(self):
         """
         if np.dtype(self.ofm) == np.int32 and self.activation is not None:

Review comment:
       Good point. Ln541 should really be checking the ofm rather than the ifm

##########
File path: tests/python/contrib/test_ethosu/test_codegen.py
##########
@@ -349,6 +349,7 @@ def representative_dataset():
         ([1, 2, 3, 4], [1, 2, 3, 4]),
         ([1, 2, 3, 4], [1, 1, 1, 1]),
         ([1, 1, 1, 1], [1, 2, 3, 4]),
+        ([1, 4, 4], [4, 1]),

Review comment:
       I was being a bit wary here about adding too many tests as adding all 3 cases would lead to 120 additional tests rather than just 40 :) I wonder if its worth testing this separately for just `ADD` for example as the underlying operation doesn't matter for this change?




-- 
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 change in pull request #9521: [microNPU] Support binary elementwise with non-4D inputs

Posted by GitBox <gi...@apache.org>.
ekalda commented on a change in pull request #9521:
URL: https://github.com/apache/tvm/pull/9521#discussion_r752346254



##########
File path: tests/python/contrib/test_ethosu/test_codegen.py
##########
@@ -349,6 +349,7 @@ def representative_dataset():
         ([1, 2, 3, 4], [1, 2, 3, 4]),
         ([1, 2, 3, 4], [1, 1, 1, 1]),
         ([1, 1, 1, 1], [1, 2, 3, 4]),
+        ([1, 4, 4], [4, 1]),

Review comment:
       Yes, good point, 120 tests is a bit too much :D Yes, I think it is a good idea to test a few IFMs with all the "flavours" of the binary elementwise operators and then have a separate test just for one of them to test all the corner cases




-- 
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 #9521: [microNPU] Support binary elementwise with non-4D inputs

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


   


-- 
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