add minimum data types and rank range for operations#910
add minimum data types and rank range for operations#910BruceDai wants to merge 10 commits intowebmachinelearning:mainfrom
Conversation
@BruceDai : Remerge with main. My PR adds an extra blank line that pacifies the build error (and yes, that line was already correct, and nothing changed there for months, but bikeshed changed). |
reillyeon
left a comment
There was a problem hiding this comment.
General wording looks good. I have not validated the specific operator limits specified.
fdwr
left a comment
There was a problem hiding this comment.
👀 Thanks for the updates Bruce - I'm sure they were tedious :b.
| <tr> | ||
| <td>{{input}}</td> | ||
| <td>[=/any data type|any=]</td> | ||
| <td>{{MLOperandDataType/"float32"}}, {{MLOperandDataType/"float16"}}, {{MLOperandDataType/"int32"}}</td> |
There was a problem hiding this comment.
ORT doesn't support int32
There was a problem hiding this comment.
🤔 An ONNX BitCast operator could help with cases of pure data movement (since no actual math happens) like this one when the operator supports a different data type of the same bit size (sizeof(int32) == sizeof(uint32) == sizeof(float32)). For example, we could call BitCast(int32input, type=float32) -> Triangular -> BitCast(input, type=int32). I'll comment on that ONNX PR.
(update) BitCast operator is pending: onnx/onnx#7527
There was a problem hiding this comment.
(update) BitCast is in ONNX https://onnx.ai/onnx/operators/onnx__BitCast.html, now enabling callers of the ORT backend to support all data types of the same bit size for data movement operators, so long as the EP supports BitCast and at least one data type of a given bit size (e.g. supporting int16 with Gather also enables uint16, float16, bfloat16...).
|
Thanks @huningxin and @fdwr for review and identifications. 👍 |
949a42f to
b6b300f
Compare
b6b300f to
3f29bff
Compare
This PR is to fix #896.
@huningxin @fdwr @reillyeon PTAL, thanks!
Preview | Diff