[TESTS] Fix random generator for custom signed types (#20393)
* [TESTS] Fix random generator for custom signed types * Increase threashold for bf16 CPU tests
This commit is contained in:
parent
ddaf8e80f9
commit
4da61fc7e7
@ -80,6 +80,10 @@ protected:
|
||||
}
|
||||
auto normalize = builder::makeNormalizeL2(params[0], axes, eps, epsMode);
|
||||
function = makeNgraphFunction(inType, params, normalize, "Normalize");
|
||||
|
||||
if (inType == ov::element::bf16) {
|
||||
abs_threshold = 1e-1f;
|
||||
}
|
||||
}
|
||||
|
||||
void generate_inputs(const std::vector<ngraph::Shape>& targetInputStaticShapes) override {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <random>
|
||||
#include <utility>
|
||||
|
||||
@ -223,7 +224,7 @@ void inline fill_data_random(T* pointer,
|
||||
const uint32_t k_range = k * range; // range with respect to k
|
||||
random.Generate(k_range);
|
||||
|
||||
if (start_from < 0 && !std::is_signed<T>::value) {
|
||||
if (start_from < 0 && !std::numeric_limits<T>::is_signed) {
|
||||
start_from = 0;
|
||||
}
|
||||
for (std::size_t i = 0; i < size; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user