masahi commented on a change in pull request #9475:
URL: https://github.com/apache/tvm/pull/9475#discussion_r749617570
##########
File path: src/relay/op/image/resize.cc
##########
@@ -215,6 +225,8 @@ bool Resize3DRel(const Array<Type>& types, int num_inputs,
const Attrs& attrs,
const Resize3DAttrs* param = attrs.as<Resize3DAttrs>();
ICHECK(param != nullptr);
+ ICHECK(param->size.size() == 3);
+ ICHECK(param->roi.size() == 10);
Review comment:
I see. This means `roi` array is sensitive to the layout, and your
change in `topi/image/resize.py` seems to support only NCW/NCHW/NCDHW.
While the ONNX definition supports arbitrary rank and doesn't distinguish
the positions of spatial axes, our op supports only certain layout +
corresponding axes position. I think it is better to remove roi for batch and
channel dims in the frontend (similar to how `out_size` is handled) and require
`param->roi.size() == 6` here for better clarity and removing the need for
dealing with roi layout in topi.
--
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]