You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[torchlib] Fix scatter reduce on error cases (#2287)
Fix three errors
```pytb
value = ir.tensor([np.iinfo(dtype.numpy()).min], dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/_core/getlimits.py", line 706, in __init__
raise ValueError("Invalid integer data type %r." % (self.kind,))
ValueError: Invalid integer data type 'b'.
```
```pytb
Traceback (most recent call last):
File "/Users/runner/work/torch-onnx-op-matrix/torch-onnx-op-matrix/op_matrix/onnx_dynamo_op_survey.py", line 54, in check_single_op
onnx.checker.check_model(onnx_model, full_check=True) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/onnx/checker.py", line 180, in check_model
C.check_model(
onnx.onnx_cpp2py_export.checker.ValidationError: Mismatched attribute type in 'node_ConstantOfShape_1 : value'. Expected: 'TENSOR', actual: 'INT'
==> Context: Bad node spec for node. Name: node_ConstantOfShape_1 OpType: ConstantOfShape
```
Fix a case for bfloat16 when min should be max.
0 commit comments