Port box_iou_rotated to stable ABI. - #9558
Conversation
fbf1f06 to
b36f042
Compare
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9558
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 4 New Failures, 2 Unrelated FailuresAs of commit 77d9846 with merge base f23f832 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
NicolasHug
left a comment
There was a problem hiding this comment.
Thanks @adabeyta , just one minor Q and comment. I'll approve now to unblock, feel free to self-merge
| // Stable-ABI sizes() has no operator << to stream into STD_TORCH_CHECK. | ||
| // Modeled after torchcodec: | ||
| // https://github.com/meta-pytorch/torchcodec/blob/1dc85b7a7900d91fee207ccdc02f211a051688fe/src/torchcodec/_core/Encoder.cpp#L140-L147 | ||
| // TODO(stable-abi): adopt << once it lands in the stable ABI upstream. |
There was a problem hiding this comment.
Nit: I think the TODO should be more something like "adopt sizes() instead of.dim() in the error message once..." ? Maybe I misunderstand
There was a problem hiding this comment.
No, you are correct. Updated to make it clearer.
| const int blocks_x = ceil_div(static_cast<int>(num_boxes1), BLOCK_DIM_X); | ||
| const int blocks_y = ceil_div(static_cast<int>(num_boxes2), BLOCK_DIM_Y); |
There was a problem hiding this comment.
QQ - Which include does this come from?
There was a problem hiding this comment.
This one comes from the cuda_helpers.h. NMS kernel uses the same include as well.
vision/torchvision/csrc/ops/cuda/cuda_helpers.h
Lines 12 to 15 in f23f832
|
CI Failures are unrelated to this PR. Merging @NicolasHug. |
Ports
box_iou_rotated(CPU + CUDA/ROCm) to the stable ABI.Notes
launch_*wrapper,THO_DISPATCH_V2splits its body on commas outside parens. Same pattern asnms_kernel.cu.Stable-ABI audit (
torch-abi-audit)Ran
torch-abi-auditagainst the builttorchvisionpackage. The legacy_C.sodrops 110 → 107 unstable asbox_iou_rotatedmoves over.