-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IR] Create
ir.tensor()
as a convenience Tensor initializer; use ml…
…_dtypes to support int4/bfloat16 (#1549) Now possible to do ```python tensor1 = ir.tensor(tensor_proto) tensor2 = ir.tensor(np_array) tensor3 = ir.tensor([1,2], dtype=ir.DataType.FLOAT) ``` supporting all ONNX dtypes. - Added ml_dtypes as a new dependency and use it to support int4/bfloat16. - Removed the unused float32->float16 helper function Tested: unit tests and doctests Fixes #1439
- Loading branch information
1 parent
d316706
commit a6843da
Showing
12 changed files
with
245 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.