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

Add ReduceProd ONNX Import #1955

Merged
merged 6 commits into from
Jul 2, 2024
Merged

Add ReduceProd ONNX Import #1955

merged 6 commits into from
Jul 2, 2024

Conversation

Dirleye
Copy link
Contributor

@Dirleye Dirleye commented Jul 1, 2024

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

#1894, #1714

Changes

Adds support for ONNX ReduceProd burn-import in an attempt to understand the structure better.

Testing

cargo test -p burn-import
cargo test -p onnx-tests

@Dirleye
Copy link
Contributor Author

Dirleye commented Jul 1, 2024

Hi there, hopefully this is all correct. Most seems to be very similar to the other reduce ops anyway.

onnx-tests is currently failing with 900.0001 != 900, probably just due to floating point multiplication shenanigans. Does anyone have some advice as to how to go about this problem?

@antimora
Copy link
Collaborator

antimora commented Jul 1, 2024

Hi there, hopefully this is all correct. Most seems to be very similar to the other reduce ops anyway.

onnx-tests is currently failing with 900.0001 != 900, probably just due to floating point multiplication shenanigans. Does anyone have some advice as to how to go about this problem?

You can change precision in assertion.

Currently, however, it's failing to due missing comma in generated code:

image

@Dirleye
Copy link
Contributor Author

Dirleye commented Jul 2, 2024

Should be better now.
run-checks all is failing at tests::jit::remainder::tests::should_be_zero but it's failing on main as well for me so it looks to be unrelated to this PR?

@Dirleye Dirleye marked this pull request as ready for review July 2, 2024 10:00
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 92.19858% with 11 lines in your changes missing coverage. Please review.

Project coverage is 85.05%. Comparing base (3a9367d) to head (b169bfe).
Report is 6 commits behind head on main.

Current head b169bfe differs from pull request most recent head e755942

Please upload reports for the commit e755942 to get more accurate results.

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 84.84% 5 Missing ⚠️
crates/burn-import/src/onnx/dim_inference.rs 80.95% 4 Missing ⚠️
crates/burn-import/src/burn/node/unary.rs 96.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1955      +/-   ##
==========================================
+ Coverage   85.04%   85.05%   +0.01%     
==========================================
  Files         793      793              
  Lines       94583    94724     +141     
==========================================
+ Hits        80442    80572     +130     
- Misses      14141    14152      +11     

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

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! I was just reviewing the PR and your last commit addressed the comments I had.

Thank you 🙏

@laggui laggui merged commit 9e6777d into tracel-ai:main Jul 2, 2024
@Dirleye Dirleye deleted the reduce-prod branch July 2, 2024 13: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.

3 participants