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

Enable negative starts and ends for slice op #1981

Conversation

johnhuichen
Copy link
Contributor

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#1714

Changes

Per https://onnx.ai/onnx/operators/onnx__Slice.html, slice's input parameters starts and ends accept negative parameters.

When start or end is negative, it is made positive by adding the corresponding tensor dim to it.

Testing

# update onnx
python /path/to/slice.py
cargo xtask run-checks all

@johnhuichen johnhuichen force-pushed the enable-negative-starts-and-ends-for-slice-op branch from 6181b4c to dae739f Compare July 6, 2024 13:41
@johnhuichen johnhuichen marked this pull request as ready for review July 6, 2024 13:41
Copy link

codecov bot commented Jul 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.51%. Comparing base (d6efb3c) to head (8442d13).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1981      +/-   ##
==========================================
- Coverage   85.64%   85.51%   -0.14%     
==========================================
  Files         810      811       +1     
  Lines      100145   100413     +268     
==========================================
+ Hits        85768    85864      +96     
- Misses      14377    14549     +172     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnhuichen johnhuichen force-pushed the enable-negative-starts-and-ends-for-slice-op branch from dae739f to c2ba5a9 Compare July 6, 2024 14:19
Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing it!

@antimora antimora merged commit c9e9054 into tracel-ai:main Jul 7, 2024
14 checks passed
@johnhuichen johnhuichen deleted the enable-negative-starts-and-ends-for-slice-op branch July 7, 2024 07:48
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