-
Notifications
You must be signed in to change notification settings - Fork 430
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 BackendRouter
to handle multiple backends
#2353
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2353 +/- ##
==========================================
+ Coverage 84.95% 85.23% +0.28%
==========================================
Files 771 785 +14
Lines 98678 103756 +5078
==========================================
+ Hits 83828 88437 +4609
- Misses 14850 15319 +469 ☔ View full report in Codecov by Sentry. |
Stoopid windows CI. Wgpu as a test backend doesn't seem to work on windows (auto device doesn't detect anything) |
I just disabled the The
|
Needs more tests :)
Checklist
run-checks all
script has been executed.Related Issues/PRs
Closes #2276
Changes
Introduces a new
BackendRouter
responsible for forwarding tensor operations to the appropriate backend, given multiple backends.This is achieved with the help of the intermediate representation defined for
ReprBackend
and the tensor/ops descriptions.Testing
Modified the
ag-news-train
text classification example to run on cuda + wgpu. Also have a MWE: