-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Closed
Labels
module: TensorIteratormodule: cpuCPU specific problem (e.g., perf, algorithm)CPU specific problem (e.g., perf, algorithm)module: primTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
a = torch.testing.make_tensor((2, 2), dtype=torch.long, device='cpu', noncontiguous=True).transpose(0, -1)
a.stride()
: (2, 4)
torch.cos(a).stride()
: (2, 1)
a = torch.testing.make_tensor((2, 2), dtype=torch.long, device='cuda', noncontiguous=True).transpose(0, -1)
a.stride()
: (2, 4)
torch.cos(a).stride()
: (1, 2)
Sometimes the CPU does preserve strides as expected, but for other inputs it doesn't.
Metadata
Metadata
Assignees
Labels
module: TensorIteratormodule: cpuCPU specific problem (e.g., perf, algorithm)CPU specific problem (e.g., perf, algorithm)module: primTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module