oneflow
oneflow copied to clipboard
When oneflow.permute is used for the same dimension operation, there is no crash, but the wrong result is returned
Summary
When oneflow.permute is used for the same dimension operation, there is no crash, but the wrong result is returned. Checks of the same dimension should be added.
Code to reproduce bug
import oneflow as flow
x = flow.tensor([[1, 2, 3],[4, 5, 6]],dtype=flow.float32)
output = flow.permute(x, (0, 0))
print(output)
import torch
x = torch.tensor([[1, 2, 3],[4, 5, 6]],dtype=torch.float32)
output = x.permute(0,0)
print(output)
System Information
- What is your OneFlow installation :dockerhub
- OS: Linux
- OneFlow version: 0.9.1.dev20231024+cu117
- Python version: 3.8