AleksKnezevic opened a new issue #10658:
URL: https://github.com/apache/tvm/issues/10658
When a flatten operator is imported from PyTorch, negative indexing on end
is handled correctly, but it is not on start.
Looking at python/tvm/relay/frontend/pytorch.py:1237
if end < 0:
end += ndim
There is no equivalent check for start.
### Expected behavior
Flatten from PyTorch with negative indexing on either argument to work
correctly.
### Actual behavior
Flatten from PyTorch fails with negative start index.
### Steps to reproduce
Run the following module though PyTorch front end:
def forward(
self,
x,
):
x1 = x[:, :, :, ::2]
x2 = x[:, :, :, 1::2]
x = torch.stack((-x2, x1), axis=-1)
return x.flatten(-2)
--
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]