-
Notifications
You must be signed in to change notification settings - Fork 469
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
Feat/op fusion decorator #939
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #939 +/- ##
==========================================
+ Coverage 86.44% 87.25% +0.81%
==========================================
Files 470 486 +16
Lines 44326 49666 +5340
==========================================
+ Hits 38317 43336 +5019
- Misses 6009 6330 +321
☔ View full report in Codecov by Sentry. |
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.
I've committed my (superficial) change requests, so it's good to go!
Burn Fusion
A new backend decorator to perform graph optimizations on a stream of operations. Backends that want to support this functionality can implement the new
FusionBackend
trait in addition to theBackend
trait.This allows the backend to provide a list of potential optimizations to be performed instead of executing a list of normal backend operations.
For now, only the Wgpu backend implements the new trait, but it allows to actually test that the new backend works even without optimizations.
Following PRs will bring new optimizations to the Wgpu backend 🔥
Overhead ?
There is some framework overhead introduced by this decorator, but since most backends are async, it shouldn't impact the speed of execution. In fact, I enabled the new backend decorator on the text classification example and the training time isn't longer than before.
The actual overhead introduced is very minimal and is constant per operation. We will introduce a cache to reduce the overhead of fusion operation implementations #935