You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "ilyag-grovety (via GitHub)" <gi...@apache.org> on 2023/03/24 15:41:12 UTC

[GitHub] [tvm] ilyag-grovety opened a new pull request, #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

ilyag-grovety opened a new pull request, #14401:
URL: https://github.com/apache/tvm/pull/14401

   This PR involves supporting the legalization case of RESIZE_NEAREST_NEIGHBOR where coordinate transformation mode is set to half_pixel.


-- 
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 #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "lhutton1 (via GitHub)" <gi...@apache.org>.
lhutton1 commented on code in PR #14401:
URL: https://github.com/apache/tvm/pull/14401#discussion_r1150861713


##########
python/tvm/relay/op/contrib/ethosu.py:
##########
@@ -1671,7 +1671,18 @@ def check_compatible_size(mode, method, upscale_size, ifm_size):
             return False
         if self.method not in ("nearest_neighbor", "linear"):
             return False
-        if self.coordinate_transformation_mode not in ("asymmetric", "align_corners"):
+        if self.coordinate_transformation_mode not in (
+            "asymmetric",
+            "align_corners",
+            "half_pixel",
+        ):
+            return False
+        if (
+            self.coordinate_transformation_mode == "half_pixel"
+            and self.rounding_method != "round_prefer_ceil"
+        ):
+            return False
+        if self.coordinate_transformation_mode != "half_pixel" and self.rounding_method != "":

Review Comment:
   Perhaps to avoid confusion we can combine this condition into the previous one as they're related?



##########
tests/python/contrib/test_ethosu/test_codegen.py:
##########
@@ -1084,18 +1084,27 @@ def squeeze_func(x):
 
 
 @pytest.mark.parametrize("accel_type", ACCEL_TYPES)
+@pytest.mark.parametrize("half_pixel", [False, True])

Review Comment:
   This adds quite a few tests due to an extra dimension in the combinations, it's probably better to add `half_pixel` to certain tests in the `ifm_shape,size` parameterization



-- 
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] ilyag-grovety commented on pull request #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "ilyag-grovety (via GitHub)" <gi...@apache.org>.
ilyag-grovety commented on PR #14401:
URL: https://github.com/apache/tvm/pull/14401#issuecomment-1485039174

   @tvm-bot rerun


-- 
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] ilyag-grovety commented on a diff in pull request #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "ilyag-grovety (via GitHub)" <gi...@apache.org>.
ilyag-grovety commented on code in PR #14401:
URL: https://github.com/apache/tvm/pull/14401#discussion_r1157056036


##########
tests/python/contrib/test_ethosu/test_codegen.py:
##########
@@ -1084,18 +1084,27 @@ def squeeze_func(x):
 
 
 @pytest.mark.parametrize("accel_type", ACCEL_TYPES)
+@pytest.mark.parametrize("half_pixel", [False, True])

Review Comment:
   Agree, I've updated tests.



-- 
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 merged pull request #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "lhutton1 (via GitHub)" <gi...@apache.org>.
lhutton1 merged PR #14401:
URL: https://github.com/apache/tvm/pull/14401


-- 
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] tvm-bot commented on pull request #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #14401:
URL: https://github.com/apache/tvm/pull/14401#issuecomment-1483014234

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @Mousius, @leandron, @lhutton1 <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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 pull request #14401: [microNPU] Add support for ResizeNearestNeighbor with half_pixel_centers=True

Posted by "lhutton1 (via GitHub)" <gi...@apache.org>.
lhutton1 commented on PR #14401:
URL: https://github.com/apache/tvm/pull/14401#issuecomment-1497119268

   Thanks @ilyag-grovety!


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