-
Notifications
You must be signed in to change notification settings - Fork 353
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
Refactor/fusion optimization #1104
Conversation
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.
LGTM, great work !
I suppose we will add tests when saving and loading are implemented ?
burn-fusion/Cargo.toml
Outdated
spin = { workspace = true } | ||
log = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } |
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.
serde_json = { workspace = true } | |
serde = {workspace = true, features = ["std", "derive"]} | |
serde_json = {workspace = true, features = ["std"]} |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1104 +/- ##
==========================================
- Coverage 85.73% 85.59% -0.14%
==========================================
Files 511 512 +1
Lines 55825 55968 +143
==========================================
+ Hits 47860 47908 +48
- Misses 7965 8060 +95 ☔ View full report in Codecov by Sentry. |
Refactor the fusion operation to support saving the state of the JIT cache so that we can reduce cold start. This is also necessary if we want to combine fusion with autotune, which is planned, since the autotune cache should share the same generated ID from the dynamically created kernel.
This PR doesn't actually save anything, but it makes everything serializable and deserializable with the correct ID. The refactor consists mostly of removing
dyn Trait
so that we can actually serialize things. The dynamic trait is replaced with an enum, which makes sense in this context.Also found a bug with burn-fusion when changing the device, so corrected that as well.