-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support for bfloat16 for binary, unary operators in reference implementation #6166
Conversation
…ntation Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6166 +/- ##
==========================================
+ Coverage 56.95% 57.24% +0.28%
==========================================
Files 506 506
Lines 30467 31036 +569
Branches 4592 4614 +22
==========================================
+ Hits 17353 17766 +413
- Misses 12285 12446 +161
+ Partials 829 824 -5 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
What will What about [TENSOR_TYPE_MAP] ( Line 21 in 88f8ef1
Related bug in onnxscript: microsoft/onnxscript#1543 |
Let me create another PR for this one. My change only use mk_dtypes to support binary operations but it does not change the custom dtype used to carry type information in numpy. We can do that as well but we need to decide first if we want to add ml_dtypes as a mandatory dependency. |
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Signed-off-by: Xavier Dupre <xadupre@microsoft.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com>
…ntation (onnx#6166) ### Description Supports bfloat16 binary, unary operations if ml_dtypes is installed. Partially answer onnx#6151. ### Motivation and Context numpy does not support bfloat16 natively but pytorch or tensorflow does. The reference implementation should support that as well. --------- Signed-off-by: Xavier Dupre <xadupre@microsoft.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Andreas Fehlner <fehlner@arcor.de>
…ntation (onnx#6166) ### Description Supports bfloat16 binary, unary operations if ml_dtypes is installed. Partially answer onnx#6151. ### Motivation and Context numpy does not support bfloat16 natively but pytorch or tensorflow does. The reference implementation should support that as well. --------- Signed-off-by: Xavier Dupre <xadupre@microsoft.com> Signed-off-by: Xavier Dupré <xadupre@users.noreply.github.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Signed-off-by: Linsho Kaku <linsho@preferred.jp>
Description
Supports bfloat16 binary, unary operations if ml_dtypes is installed. Partially answer #6151.
Motivation and Context
numpy does not support bfloat16 natively but pytorch or tensorflow does. The reference implementation should support that as well.