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)
[email protected]("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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]