-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Tracking] Spec clarifications #3651
Comments
Old issues which look still valid: Pooling related
Conv/ConvTranspose related
RNN/LSTM related
Other operators
IR related
|
Conv operation does not specify if M (channel out) must be a multiple of number of groups. TF Keras and Pytorch have this restriction. #3641 |
Difference between Add and Sum could be more explicit, and that difference would be nice to have mentioned in both operator's documentation. |
The description of Cast operator could be improved (especially with conversions involving bool or string). |
[Spec issue] Rounding or truncation behavior for Cast operator is not specified in the spec #3876 |
DequantizeLinear/QuantizeLinear: Spec should be more explicit if the inputs should be 2D or can be N-D, and explain the behavior in N-D case better. |
QuantizeLinear: Spec should be more clear about the precision used for the different operators when using mixed-precision inputs (in computing |
LSTM: whenever |
Prelu: The constraint https://github.com/onnx/onnx/blob/main/docs/Operators.md#Prelu |
I have a same question as #2303: "Do subgraph initializer names and input names shadow outer-scope names?" It's better to clarify it in the IR. |
The specification of the "Pad" operator does not describe the intended behavior when there is an interaction between the use of negative pad-values (to truncate/slice) and the use of |
The |
Minor point, but naming of inputs matter in our onnx-mlir code base and we had to write extra templates because A & B for the MatMul, MatMulInteger, and QLinearMatMul are capitalized differently. Use
Use I know this may not matter to most, and it is not a big deal, but nevertheless name discrepancy between related ops for which, for example, shape inference can be "commoned" may face minor impediments due to naming conventions. If this can be fixed without triggering incompatibilities between before/after renaming, then I am for it. If it would trigger incompatibilities, then let us just remember to use names as consistency as possible for future ops. Thanks |
My own guess would be that the names should not matter. But, paradoxically, it looks like it would matter for onnx-mlir. I am in favor of using uniform naming conventions. If anyone has any concerns about changing parameter names of ops (without changing their version-number), please let us know. |
@gramalingam thanks for your answers Found another case: Conv/ConvTranspose uses |
Another couple of issues relating to Reduce* ops: (a) I assume that the Reduce* ops should support the special-case of zero-rank tensors (with a single element). It would be good if the spec explicitly clarifies this. (b) The spec does not indicate what happens if the input is a tensor with zero elements: e.g., a tensor of shape (100, 0) with reduction along the axis with size 0 (axis 1 in above example). In any case, some clarification whether this is allowed would be useful. |
Max and Min can both take rank 0 tensors as inputs but it was not clear from the spec. |
Regarding Pad op spec: Lines 17129 to 17142 in 0e9deba
|
Regarding MeanVarianceNormalization op spec: Lines 15221 to 15226 in 0f53636
|
Clarify the behavior of the reduction-ops when reducing an empty set of values, by updating the test-cases and documentation. It is useful in various edge-cases. For example, ReduceProd should return 1 for an empty tensor, and ReduceSum should return 0 for an empty tensor. (See #3651 (comment)) ### Summary ReduceSum ({}) = 0 ReduceProd ({}) = 1 ReduceMin ({}) = Max. value of datatype ReduceMax ({}) = Min. value of datatype ReduceLogSum ({}) = minus infinity or undefined for datatypes without minus infinity ReduceLogSumExp ({}) = minus infinity or undefined for datatypes without minus infinity ReduceMean ({}) = Undefined --------- Signed-off-by: Ganesan Ramalingam <grama@microsoft.com> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: gramalingam <gramalingam@users.noreply.github.com>
Creating this issue to track work items for spec clarifications. There are already multiple GitHub issues regarding op spec not being clear or error in expected outputs. I will collect them in this issue. Feel free to add more work item here. Thanks!
The text was updated successfully, but these errors were encountered: