Skip to content

Add layer norm onnx op support #1680

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

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Add layer norm onnx op support #1680

merged 1 commit into from
Apr 23, 2024

Conversation

laggui
Copy link
Member

@laggui laggui commented Apr 22, 2024

Related Issues/PRs

Progress towards #1544

Changes

Added layer norm ONNX op import support

Testing

Added unit tests for codegen and expected outputs

@laggui laggui requested a review from antimora April 22, 2024 14:42
Comment on lines +103 to +106
// TODO: handle self.full_precision
quote! {
let #output = self.#field.forward(#input);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Was thinking we could match the elem precision and call into_full_precision() but the backendbridge requires the backend to be specified and here this is a generic... so can't do that right now.

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 97.60766% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 86.44%. Comparing base (6c70852) to head (7193c7f).

Files Patch % Lines
crates/burn-import/src/onnx/op_configuration.rs 84.61% 4 Missing ⚠️
crates/burn-import/src/burn/node/layer_norm.rs 99.24% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1680      +/-   ##
==========================================
+ Coverage   86.41%   86.44%   +0.02%     
==========================================
  Files         694      695       +1     
  Lines       80676    80885     +209     
==========================================
+ Hits        69718    69922     +204     
- Misses      10958    10963       +5     

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

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

@laggui laggui merged commit e6b1b7a into main Apr 23, 2024
@laggui laggui deleted the feat/onnx/layer-norm branch April 23, 2024 15:19
syl20bnr pushed a commit that referenced this pull request Apr 26, 2024
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