-
Notifications
You must be signed in to change notification settings - Fork 26k
Closed
Labels
actionablegood first issuemodule: edge casesAdversarial inputs unlikely to occur in practiceAdversarial inputs unlikely to occur in practicetriagedThis 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
🐛 Describe the bug
aminmax will trigger INTERNAL ASSERT if input is empty on cuda
import torch
def fn(input):
return input.aminmax(dim=0)
device = "cuda"
input = torch.empty([36, 0], dtype=torch.float32)
input.uniform_(-16, 3)
fn(input.to(device))
# RuntimeError: iter.numel() > 0 && iter.ntensors() - iter.noutputs() == 1 && iter.noutputs() >= 1 INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1663571524876/work/aten/src/ATen/native/cuda/Reduce.cuh":1134, please report a bug to PyTorch.On cpu, it will just return empty tensor
Versions
torch: '1.13.0.dev20220919'
cc @pbelevich
Metadata
Metadata
Assignees
Labels
actionablegood first issuemodule: edge casesAdversarial inputs unlikely to occur in practiceAdversarial inputs unlikely to occur in practicetriagedThis 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