Skip to content
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

[TorchToLinalg] Fix possible OOB access in Interpolate lowering #3570

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

zjgarvey
Copy link
Collaborator

Following up from the discussion in #3550, I've edited the lowering to prevent OOB extracts in a more direct fashion (i.e., just clamping directly).

I don't think this affects the lit tests at all, but I've tested the changes in our external test suite at https://github.com/nod-ai/SHARK-TestSuite/tree/main/. I found the issue when I was unexpectedly getting nan's along the output image border for a resize test there.

@zjgarvey zjgarvey merged commit d0933b0 into llvm:main Aug 2, 2024
3 checks passed
pkapris-syrmia pushed a commit to pkapris-syrmia/torch-mlir that referenced this pull request Aug 15, 2024
…#3570)

Following up from the discussion in
<llvm#3550>, I've edited the lowering
to prevent OOB extracts in a more direct fashion (i.e., just clamping
directly).

I don't think this affects the lit tests at all, but I've tested the
changes in our external test suite at
<https://github.com/nod-ai/SHARK-TestSuite/tree/main/>. I found the
issue when I was unexpectedly getting `nan`'s along the output image
border for a resize test there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants