Remove redundant constructor_validate_and_infer_types() calls. (#5832)

This commit is contained in:
Szymon Durawa 2021-06-02 09:15:53 +02:00 committed by GitHub
parent 4b486e6223
commit 662a8e6db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 5 deletions

View File

@ -66,7 +66,6 @@ namespace ngraph
{
write_values(values);
}
constructor_validate_and_infer_types();
m_all_elements_bitwise_identical = are_all_data_elements_bitwise_identical();
}
@ -84,7 +83,6 @@ namespace ngraph
: Constant(type, shape)
{
fill_data(type, value);
constructor_validate_and_infer_types();
m_all_elements_bitwise_identical = true;
}

View File

@ -62,8 +62,6 @@ op::Constant::Constant(const element::Type& type,
shape_size(m_shape),
".");
constructor_validate_and_infer_types();
using Type_t = element::Type_t;
if (values.size() == 1 && shape_size(m_shape) != 1)
@ -138,7 +136,6 @@ op::Constant::Constant(const element::Type& type, const Shape& shape, const void
{
size_t size = ceil(shape_size(m_shape) * m_element_type.bitwidth() / 8.f);
std::memcpy(get_data_ptr_nc(), data, size);
constructor_validate_and_infer_types();
m_all_elements_bitwise_identical = are_all_data_elements_bitwise_identical();
}