blackkker opened a new pull request, #12467:
URL: https://github.com/apache/tvm/pull/12467

   According to the pytorch doc 
[torch.nn.MaxPool3d](https://pytorch.org/docs/stable/generated/torch.nn.MaxPool3d.html?highlight=pool3d#torch.nn.MaxPool3d).
 The shape of input can be `(N,C,D,H,W) or (C,D,H,W)`. While the MaxPool3DAttrs 
 thinks the dimension should be 
5.https://github.com/apache/tvm/blob/bcc7cde95c1e84b85f18c07110489350865b8cfe/include/tvm/relay/attrs/nn.h#L985-L996
   which could leads to out of bound error `Check failed: (0 <= i && i < 
p->size_) is false: IndexError: indexing 4 on an array of size 4` when `ii == 4 
and dshape == 4`.
   
https://github.com/apache/tvm/blob/bcc7cde95c1e84b85f18c07110489350865b8cfe/src/relay/op/nn/pooling.cc#L1211-L1216
   
   Therefore, I add an expand_dims operation on the front end to avoid this 
situation.
   


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

Reply via email to