-
Notifications
You must be signed in to change notification settings - Fork 645
Refactor: Move op_configuration.rs from burn-import to onnx-ir #3126
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3126 +/- ##
==========================================
+ Coverage 81.57% 82.15% +0.57%
==========================================
Files 904 956 +52
Lines 118064 121759 +3695
==========================================
+ Hits 96314 100026 +3712
+ Misses 21750 21733 -17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Still remaining: expand_config tile_config top_k_config trilu_config pad_config unsqueeze_config split_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors configuration usage by moving op_configuration.rs from burn-import to onnx-ir and updates the associated node implementations and tests accordingly. Key changes include replacing direct imports from burn::nn with onnx_ir equivalents, updating test configurations for various convolution and pooling nodes, and revising documentation in both the onnx-tests and contributor guide files.
Reviewed Changes
Copilot reviewed 88 out of 88 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
crates/burn-import/src/burn/node/linear.rs | Replaces LinearConfig import from burn::nn with onnx_ir::node::linear::LinearConfig. |
crates/burn-import/src/burn/node/layer_norm.rs | Updates LayerNorm configuration by importing from onnx_ir instead of burn::nn. |
crates/burn-import/src/burn/node/expand.rs | Adjusts ExpandShape handling and test configuration to use Argument-based parameters. |
crates/burn-import/src/burn/node/dropout.rs | Swaps out DropoutConfig import from burn::nn to onnx_ir::node::dropout::DropoutConfig. |
crates/burn-import/src/burn/node/conv_transpose_3d.rs | Modifies ConvTranspose3d configuration to use a new parameter ordering and values. |
crates/burn-import/src/burn/node/conv_transpose_2d.rs | Updates ConvTranspose2d configuration with revised parameters and stride values. |
... | Other files include similar updates for conv1d/conv2d/conv3d, pooling nodes, and documentation updates. |
Comments suppressed due to low confidence (2)
crates/burn-import/src/burn/node/conv_transpose_3d.rs:186
- The stride values are set to [0, 0, 0] which may result in invalid behavior during execution. Verify whether a zero stride is intentional or if non-zero values should be used.
.with_stride([0, 0, 0])
crates/burn-import/src/burn/node/conv_transpose_2d.rs:186
- Stride values are set to [0, 0] which might cause incorrect behavior. Confirm that a zero stride is intended for this configuration.
.with_stride([0, 0])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of lines to go over to essentially 1) move the node configs to onnx-ir and 2) move the node rank inference functions from rank_inference.rs
to a file per node 😅
I understand the objective to get onnx-ir standalone (no dependency to burn), but I have some comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node builder pattern is a big improvement, thanks! This addresses my main concern.
…l-ai#3126) * Move conv1d, avg_pool1d, max_pool1d and conv_transpose1d to onnx-ir * Fix format * Fix format * Move conv1d rank update * Move conv_transpose1d_update_outputs * Removed and replaced as same_as_input * Move op config from burn-import * Moved 2d and 3d config functions * Move some config functions to node * Moved op configs to individual node modules Still remaining: expand_config tile_config top_k_config trilu_config pad_config unsqueeze_config split_config * Break down reduce module into individual modules * Move rank inference functions * Move rank updates to node module * Add documentation * Repoint config function from onnx-ir * Remove burn types from onnx-ir * Fixed left over tests * No default init for config structs * Fix format * remove op_configuration.rs * Decouple burn-import types from op_configuration * Moved remaining configs from burn-import to onnx-ir * Update the documentation * Remove "Features" section * Converted links to resources * Remove deadcode * Shorten burn-import readme * Remove inline comments * Add NodeBuilder and refactor test code * Refactor tests to use NodeBuilder * Refactored tests to use NodeBuilder * Refactored tests to use NodeBuilder * Refactored tests to use NodeBuilder * Refactored tests to use NodeBuilder * Refactored tests to use NodeBuilder * Refactored tests to use NodeBuilder * Remove inline comments
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
Fixes #3091
Changes
op_configuration.rs
fromburn-import
toonnx-ir
. Theonnx-ir
module does not depend on any data types fromburn-import
orburn
. Configurations are now organized by node type.onnx-ir
and added corresponding unit tests.Testing