diff --git a/ngraph/core/src/type/element_type.cpp b/ngraph/core/src/type/element_type.cpp index a807bb56a7c..828c3b7c787 100644 --- a/ngraph/core/src/type/element_type.cpp +++ b/ngraph/core/src/type/element_type.cpp @@ -357,6 +357,7 @@ namespace ngraph {"i16", element::Type_t::i16}, {"i32", element::Type_t::i32}, {"i64", element::Type_t::i64}, + {"u1", element::Type_t::u1}, {"u8", element::Type_t::u8}, {"u16", element::Type_t::u16}, {"u32", element::Type_t::u32}, diff --git a/ngraph/python/src/pyngraph/ops/constant.cpp b/ngraph/python/src/pyngraph/ops/constant.cpp index 4b3265f8ce5..1f6dd6b0850 100644 --- a/ngraph/python/src/pyngraph/ops/constant.cpp +++ b/ngraph/python/src/pyngraph/ops/constant.cpp @@ -149,7 +149,7 @@ void regclass_pyngraph_op_Constant(py::module m) { return _cast_vector(self); } - else if (element_type == ngraph::element::u8) + else if (element_type == ngraph::element::u8 || element_type == ngraph::element::u1) { return _cast_vector(self); } @@ -206,7 +206,7 @@ void regclass_pyngraph_op_Constant(py::module m) { return _get_buffer_info(self); } - else if (element_type == ngraph::element::u8) + else if (element_type == ngraph::element::u8 || element_type == ngraph::element::u1) { return _get_buffer_info(self); } diff --git a/ngraph/python/src/pyngraph/types/element_type.cpp b/ngraph/python/src/pyngraph/types/element_type.cpp index 67ed479e5e7..ce72aacc715 100644 --- a/ngraph/python/src/pyngraph/types/element_type.cpp +++ b/ngraph/python/src/pyngraph/types/element_type.cpp @@ -35,6 +35,7 @@ void regclass_pyngraph_Type(py::module m) type.attr("i16") = ngraph::element::i16; type.attr("i32") = ngraph::element::i32; type.attr("i64") = ngraph::element::i64; + type.attr("u1") = ngraph::element::u1; type.attr("u8") = ngraph::element::u8; type.attr("u16") = ngraph::element::u16; type.attr("u32") = ngraph::element::u32;