Try to fix fuzzer tests (#15303)

* Try to fix fuzzer tests

* Try to fix test
This commit is contained in:
Ilya Churaev authored and GitHub committed 2023-01-26 12:09:58 +04:00
1 parent 5e77169079
commit c0f524e3bd
2 files changed
+7 -2

No files matched your search

@@ -30,6 +30,7 @@ void shape_infer(const Squeeze* op,
NODE_VALIDATION_CHECK(op, output_shapes.size() == 1);
const auto number_of_inputs = input_shapes.size();
OPENVINO_ASSERT(!input_shapes.empty());
const auto& arg_shape = input_shapes[0];
const auto& arg_rank = arg_shape.rank();
+6 -2
View File
@@ -97,8 +97,12 @@ float16::float16(float value) {
// Restore the hidden 1
frac = 0x04000000 | ((iv & fmask_32) << 3);
// Will any bits be shifted off?
uint32_t sticky = (frac & ((1 << (1 - biased_exp_16)) - 1)) ? 1 : 0;
frac >>= 1 + (-biased_exp_16);
int32_t shift = biased_exp_16 < -30 ? 0 : (1 << (1 - biased_exp_16));
uint32_t sticky = (frac & (shift - 1)) ? 1 : 0;
if (1 + (-biased_exp_16) > 31)
frac = 0;
else
frac >>= 1 + (-biased_exp_16);
frac |= sticky;
if (((frac & rhalf_16) == rodd_16) || ((frac & rnorm_16) != 0)) {
frac += reven_16;