-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Bug] torchvision.ops.roi_align
is throwing an internal assert failed
#1157
Comments
Note: I've been able to partially work around this (partially because I'm getting a different issue afterwards) by modifying diff -x __pycache__ /home/brett/github/torchvision/torchvision/ops/ps_roi_align.py /home/brett/.local/lib/python3.10/site-packages/torchvision/ops/ps_roi_align.py
2a3
> from torch.jit.annotations import BroadcastingList2
13c14
< output_size: int,
---
> output_size: BroadcastingList2[int],
67c68
< output_size: int,
---
> output_size: BroadcastingList2[int],
diff -x __pycache__ /home/brett/github/torchvision/torchvision/ops/roi_align.py /home/brett/.local/lib/python3.10/site-packages/torchvision/ops/roi_align.py
59c59,61
< if not isinstance(rois, torch.Tensor):
---
> if isinstance(rois, torch.Tensor):
> pass
> else:
diff -x __pycache__ /home/brett/github/torchvision/torchvision/ops/_utils.py /home/brett/.local/lib/python3.10/site-packages/torchvision/ops/_utils.py
29c29,31
< if isinstance(boxes, (list, tuple)):
---
> if isinstance(boxes, torch.Tensor):
> assert boxes.size(1) == 5, "The boxes tensor shape is not correct as Tensor[K, 5]"
> elif isinstance(boxes, (list, tuple)):
34,35d35
< elif isinstance(boxes, torch.Tensor):
< assert boxes.size(1) == 5, "The boxes tensor shape is not correct as Tensor[K, 5]" so it looks like something is messed up with |
As a temporary work-around while this and other issues are getting fixed, is it possible to tell |
I see that the |
This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days |
This issue has not seen activity for 90 days, Remove stale label or comment or this will be closed in 10 days |
Bug Description
torchvision.ops.roi_align
is throwing an internal assert failure when compiling a model using it withtorch_tensorrt.compile
.To Reproduce
Repro script: trt_bug3.py
Expected behavior
Expected graph compilation to succeed.
Environment
TensorRT is built from 91a92ca with PR #1067 merged in
The text was updated successfully, but these errors were encountered: