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

Allow negative indices in Gather op #47

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Conversation

robertknight
Copy link
Owner

Per the ONNX spec [1]:

All index values are expected to be within bounds [-s, s-1] along axis of size s.

The implementation already supported negative values, only the bounds check preceding it did not.

[1] https://onnx.ai/onnx/operators/onnx__Gather.html

Fixes #46

Per the ONNX spec [1]:

> All index values are expected to be within bounds [-s, s-1] along axis of size s.

The implementation already supported negative values, only the bounds check
preceding it did not.

[1] https://onnx.ai/onnx/operators/onnx__Gather.html

Fixes #46
@robertknight robertknight merged commit f6184a4 into main Feb 2, 2024
1 check passed
@robertknight robertknight deleted the fix-gather-negative-index branch February 2, 2024 22:47
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.

Transformer inference error
1 participant