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

Enhance slice operation to support more range variation #1989

Merged
merged 5 commits into from
Jul 8, 2024

Conversation

antimora
Copy link
Collaborator

@antimora antimora commented Jul 8, 2024

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

#1915, #1981, #1982, #1983

Changes

Primarily to support ONNX slice operation and closer PyTorch compatibility.

  1. Enhance slice operation to support more range variations: None for a missing rage and negative ranks in ranges.
  2. Clamp range start and end to dimension ranks.

Testing

More unit tests

@antimora
Copy link
Collaborator Author

antimora commented Jul 8, 2024

@johnhuichen, please review this PR if you have a chance since you worked in this area previosly.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

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

LGTM! Just gotta fix the CI errors on the doc tests.

crates/burn-tensor/src/tensor/api/base.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 10 lines in your changes missing coverage. Please review.

Project coverage is 85.36%. Comparing base (c9e9054) to head (690f3cc).
Report is 3 commits behind head on main.

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 76.92% 9 Missing ⚠️
crates/burn-import/src/burn/node/slice.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1989      +/-   ##
==========================================
- Coverage   85.50%   85.36%   -0.14%     
==========================================
  Files         811      820       +9     
  Lines      100449   101175     +726     
==========================================
+ Hits        85887    86372     +485     
- Misses      14562    14803     +241     

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

@antimora antimora requested review from johnhuichen and laggui July 8, 2024 16:49
@antimora antimora requested a review from laggui July 8, 2024 18:04
@antimora antimora merged commit e8b915a into tracel-ai:main Jul 8, 2024
14 checks passed
@antimora antimora mentioned this pull request Jul 16, 2024
2 tasks
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.

3 participants