1.19: Clip operator with type FLOAT16 defaults to min or max value 0.0 if not explicitly given, breaking many models using FLOAT16 #21957
Labels
regression
issues that demonstrate a regression in ORT functionality and need to be addressed immediately
Describe the issue
On version 1.19, for type
FLOAT16
, themin
ormax
values are set to default0.0
if not explicitly set. This is the wrong behaviour, and breaks quite a few models that use FLOAT16.For instance, the tensor
[-1, 0.5, 1.0]
with a min value of0.0
(and no max value set) would result in[0.0, 0.0, 0.0]
instead of the expected[0.0, 0.5, 1.0]
. This is likewise for giving amax
value but not amin
value. The behaviour is as expected if both are set.The expected values of
min
andmax
if not given is-inf
andinf
respectively, not0.0
.This is not a problem for instance for the regular FLOAT type.
This was not a problem on 1.18.
To reproduce
The following Python code fails when running
FLOAT16
:This code does not fail on 1.18.
Urgency
URGENT: This is a blocker for us to upgrade to 1.19 as it breaks quite a few models using FLOAT16.
Platform
Linux
OS Version
all
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: