Skip to content

Remove graph break in giou and diou losses#9518

Open
lgeiger wants to merge 1 commit into
pytorch:mainfrom
lgeiger:giou-graph-break
Open

Remove graph break in giou and diou losses#9518
lgeiger wants to merge 1 commit into
pytorch:mainfrom
lgeiger:giou-graph-break

Conversation

@lgeiger

@lgeiger lgeiger commented Jun 17, 2026

Copy link
Copy Markdown

Indexing with a boolean mask causes a GPU to CPU sync which causes a graph break during torch.compile.

This PR replaces the masking with a simple clamp inside the giou and diou losses to make it play well with torch.compile.

@pytorch-bot

pytorch-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9518

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the cla signed label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant