-
Notifications
You must be signed in to change notification settings - Fork 85
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
dialects (tosa): initialize dialect and add Clamp and Rescale operation #3158
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3158 +/- ##
=======================================
Coverage 90.00% 90.01%
=======================================
Files 427 428 +1
Lines 53860 53890 +30
Branches 8344 8346 +2
=======================================
+ Hits 48477 48507 +30
Misses 4036 4036
Partials 1347 1347 ☔ View full report in Codecov by Sentry. |
xdsl/dialects/tosa.py
Outdated
assembly_format = "$input attr-dict `:` `(` type($input) `)` `->` type($output)" | ||
|
||
|
||
TOSA = Dialect("tosa", [ClampOp, RescaleOp], []) |
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.
nit: I assume there will be more ops
TOSA = Dialect("tosa", [ClampOp, RescaleOp], []) | |
TOSA = Dialect("tosa", [ | |
ClampOp, | |
RescaleOp, | |
], | |
[] | |
) |
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.
What's the plan for TOSA? Are you using it in a project?
We're currently running some MLPerf Tiny benchmarks on SNAX, which are provided in tflite flatbuffers, and tensorflow has a conversion to TOSA. Most of mlir's builtin tosa-to-linalg lowerings are perfectly fine, but the layer-to-layer quantization rescaling comes out looking really ugly. As we have dedicated hardware for this rescaling, I'd like to lower this straight from these tosa ops. |
No description provided.