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/04/01 15:44:34 UTC

[GitHub] [tvm] NicolaLancellotti commented on a change in pull request #10860: [ETHOSN] Improved handling of 5d reshapes

NicolaLancellotti commented on a change in pull request #10860:
URL: https://github.com/apache/tvm/pull/10860#discussion_r840711526



##########
File path: src/relay/backend/contrib/ethosn/ethosn_api.cc
##########
@@ -275,6 +275,11 @@ EthosnError EthosnAPI::Reshape(const Expr& expr, ReshapeParams* params) {
   const auto* input_dtype = reshape->args[0]->checked_type().as<TensorTypeNode>();
   const auto& reshape_attrs = reshape->attrs.as<ReshapeAttrs>();
 
+  if (reshape_attrs->newshape.size() > params->new_shape.size()) {
+    return EthosnError(ErrStrm() << "reshape dimension=" << reshape_attrs->newshape.size()
+                                 << ", reshape dimension must be <= 4");

Review comment:
       Why 4? Shouldn't be `params->new_shape.size()`?
   ```suggestion
                                    << ", reshape dimension must be <= " << params->new_shape.size() );
   ```




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