-
Notifications
You must be signed in to change notification settings - Fork 11
Add support for FLOAT8E8M0 data type #128
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
Conversation
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #128 +/- ##
==========================================
+ Coverage 74.80% 74.84% +0.03%
==========================================
Files 39 39
Lines 4723 4726 +3
Branches 966 967 +1
==========================================
+ Hits 3533 3537 +4
+ Misses 840 839 -1
Partials 350 350 ☔ View full report in Codecov by Sentry. |
Please update serde_test, core_test, tensor_adapters_test, and tensor_adapters as well. You can do a broader search for float8 to see all the places the types are mentioned. |
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Done! I've added comprehensive FLOAT8E8M0 support to all the requested files:
The implementation properly handles FLOAT8E8M0's unique characteristics (8 exponent bits, 0 mantissa bits) and includes conditional logic for ONNX versions that don't yet support this type. Commit: 476ea63 |
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
This PR adds comprehensive support for the FLOAT8E8M0 data type that was added to ONNX in onnx/onnx#7030.
Changes Made
ml_dtypes.float8_e8m0fnu
serde.py
for proper tensor serialization/deserializationTesting
The implementation includes comprehensive testing:
All existing tests continue to pass, ensuring no regression in functionality.
Fixes #127.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.