Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,21 @@ ov::pass::ConvertQuantizeDequantize::ConvertQuantizeDequantize(
if (!ov::op::util::get_single_value(output_high, out_high_val))
return false;

#define PRECISION_LIMITS_FOR(type) \
{ov::element::type}, { \
static_cast<float>(std::numeric_limits<ov::fundamental_type_for<ov::element::type>>::min()), \
#define PRECISION_LIMITS_FOR(type) \
m[ov::element::type] = std::make_pair( \
static_cast<float>(std::numeric_limits<ov::fundamental_type_for<ov::element::type>>::min()), \
static_cast<float>(std::numeric_limits<ov::fundamental_type_for<ov::element::type>>::max()) \
}
)

static const std::unordered_map<ov::element::Type_t, std::pair<float, float>> supported_intervals = []() {
std::unordered_map<ov::element::Type_t, std::pair<float, float>> m;
PRECISION_LIMITS_FOR(i8);
PRECISION_LIMITS_FOR(u8);
PRECISION_LIMITS_FOR(i16);
PRECISION_LIMITS_FOR(u16);
return m;
}();

static const std::unordered_map<ov::element::Type_t, std::pair<float, float>> supported_intervals{
{PRECISION_LIMITS_FOR(i8)},
{PRECISION_LIMITS_FOR(u8)},
{PRECISION_LIMITS_FOR(i16)},
{PRECISION_LIMITS_FOR(u16)}};
#undef PRECISION_LIMITS_FOR

const auto& type = convert1.get_element_type();
Expand Down
Loading