Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions docs/articles_en/about-openvino/release-notes-openvino.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,6 @@ Discontinued in 2025

Deprecated and to be removed in the future
--------------------------------------------
* ``openvino.Type.undefined`` is now deprecated and will be removed with version 2026.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section about 25.0 should be kept. Later, for 2026.0 we will add an entry that Type.undefined was removed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i think this PR is targeted to be merged for 2026.0 release. should this change to inform that Type.undefined is removed already?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik usually there is a big pr with updates to release-notes. It makes sense to remove this part, but I am not sure what other changes are necessary @tsavina

``openvino.Type.dynamic`` should be used instead.
* APT & YUM Repositories Restructure:
Starting with release 2025.1, users can switch to the new repository structure for APT and YUM,
which no longer uses year-based subdirectories (like “2025”). The old (legacy) structure will
Expand Down
4 changes: 1 addition & 3 deletions src/bindings/c/docs/api_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ typedef struct {
```
typedef enum {

UNDEFINED = 0U, //!< Undefined element type

DYNAMIC, //!< Dynamic element type
DYNAMIC = 0U, //!< Dynamic element type

BOOLEAN, //!< boolean element type

Expand Down
53 changes: 26 additions & 27 deletions src/bindings/c/include/openvino/c/ov_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,33 +169,32 @@ typedef enum {
* src/core/include/openvino/core/type/element_type.hpp
*/
typedef enum {
UNDEFINED = 0U, //!< Undefined element type
DYNAMIC = UNDEFINED, //!< Dynamic element type
BOOLEAN, //!< boolean element type
BF16, //!< bf16 element type
F16, //!< f16 element type
F32, //!< f32 element type
F64, //!< f64 element type
I4, //!< i4 element type
I8, //!< i8 element type
I16, //!< i16 element type
I32, //!< i32 element type
I64, //!< i64 element type
U1, //!< binary element type
U2, //!< u2 element type
U3, //!< u3 element type
U4, //!< u4 element type
U6, //!< u6 element type
U8, //!< u8 element type
U16, //!< u16 element type
U32, //!< u32 element type
U64, //!< u64 element type
NF4, //!< nf4 element type
F8E4M3, //!< f8e4m3 element type
F8E5M3, //!< f8e5m2 element type
STRING, //!< string element type
F4E2M1, //!< f4e2m1 element type
F8E8M0, //!< f8e8m0 element type
DYNAMIC = 0U, //!< Dynamic element type
BOOLEAN, //!< boolean element type
BF16, //!< bf16 element type
F16, //!< f16 element type
F32, //!< f32 element type
F64, //!< f64 element type
I4, //!< i4 element type
I8, //!< i8 element type
I16, //!< i16 element type
I32, //!< i32 element type
I64, //!< i64 element type
U1, //!< binary element type
U2, //!< u2 element type
U3, //!< u3 element type
U4, //!< u4 element type
U6, //!< u6 element type
U8, //!< u8 element type
U16, //!< u16 element type
U32, //!< u32 element type
U64, //!< u64 element type
NF4, //!< nf4 element type
F8E4M3, //!< f8e4m3 element type
F8E5M3, //!< f8e5m2 element type
STRING, //!< string element type
F4E2M1, //!< f4e2m1 element type
F8E8M0, //!< f8e8m0 element type
} ov_element_type_e;

/**
Expand Down
5 changes: 3 additions & 2 deletions src/bindings/c/src/ov_tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

#include "common.h"

// clang-format off
const std::map<ov_element_type_e, ov::element::Type> element_type_map = {
{ov_element_type_e::UNDEFINED, ov::element::dynamic},
{ov_element_type_e::DYNAMIC, ov::element::dynamic},
{ov_element_type_e::BOOLEAN, ov::element::boolean},
{ov_element_type_e::BF16, ov::element::bf16},
Expand Down Expand Up @@ -34,14 +34,15 @@ const std::map<ov_element_type_e, ov::element::Type> element_type_map = {
{ov_element_type_e::F4E2M1, ov::element::f4e2m1},
{ov_element_type_e::F8E8M0, ov::element::f8e8m0},
};
// clang-format on

ov_element_type_e find_ov_element_type_e(ov::element::Type type) {
for (auto iter = element_type_map.begin(); iter != element_type_map.end(); iter++) {
if (iter->second == type) {
return iter->first;
}
}
return ov_element_type_e::UNDEFINED;
return ov_element_type_e::DYNAMIC;
}

ov::element::Type get_element_type(ov_element_type_e type) {
Expand Down
1 change: 0 additions & 1 deletion src/bindings/python/scripts/generate_pyapi_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"VASurfaceTensorWrapper", # In openvino._pyopenvino.VAContext.create_tensor : Can't find/import 'VASurfaceTensorWrapper'
"typing_extensions.CapsuleType", # In openvino._pyopenvino.VAContext.__init__ : Can't find/import 'typing_extensions.CapsuleType'
"_abc._abc_data", # In openvino.utils.data_helpers.wrappers.OVDict : Can't find/import '_abc._abc_data'
"openvino._ov_api.undefined_deprecated", # In openvino._ov_api : Can't find/import 'openvino._ov_api.undefined_deprecated'
"InputCutInfo", # In openvino.tools.ovc.cli_parser : Can't find/import 'InputCutInfo'
"ParamData" # In openvino.tools.ovc.cli_parser : Can't find/import 'ParamData'
]
Expand Down
14 changes: 0 additions & 14 deletions src/bindings/python/src/openvino/_ov_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
_data_dispatch,
tensor_from_file,
)
from openvino.package_utils import deprecatedclassproperty


class ModelMeta(type):
Expand Down Expand Up @@ -708,16 +707,3 @@ def compile_model(
if isinstance(model, Model):
model = model._Model__model
return core.compile_model(model, device_name, {} if config is None else config)


@deprecatedclassproperty(
name="openvino.Type.undefined", # noqa: N802, N805
version="2026.0",
message="Please use openvino.Type.dynamic instead.",
stacklevel=2,
)
def undefined_deprecated(self): # type: ignore
return Type.dynamic


Type.undefined = undefined_deprecated
19 changes: 0 additions & 19 deletions src/bindings/python/tests/test_runtime/test_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,6 @@ def test_basic_ovtypes(ovtype,
assert ovtype.bitwidth == type_bitwidth


def test_undefined_ovtype():
with pytest.warns(DeprecationWarning, match="openvino.Type.undefined is deprecated and will be removed in version 2026.0") as w:
ov_type = Type.undefined
assert issubclass(w[0].category, DeprecationWarning)
assert "openvino.Type.undefined is deprecated and will be removed in version 2026.0" in str(w[0].message)

assert ov_type.is_static() is False
assert ov_type.is_dynamic() is True
assert ov_type.is_real() is False
assert ov_type.is_integral() is True
assert ov_type.is_signed() is False
assert ov_type.is_quantized() is False
assert ov_type.get_type_name() == "dynamic"
assert ov_type.size == 0
assert ov_type.get_size() == 0
assert ov_type.bitwidth == 0
assert ov_type.get_bitwidth() == 0


def test_dynamic_ov_type():
ov_type = Type.dynamic
assert ov_type.is_static() is False
Expand Down
58 changes: 25 additions & 33 deletions src/core/include/openvino/core/type/element_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,31 @@ namespace element {
/// \ingroup ov_element_cpp_api
enum class Type_t {
dynamic, //!< Dynamic element type
undefined OPENVINO_ENUM_DEPRECATED("This type is deprecated and will be removed in 2026.0. Use dynamic instead.") =
dynamic, //!< Undefined element type
boolean, //!< boolean element type
bf16, //!< bf16 element type
f16, //!< f16 element type
f32, //!< f32 element type
f64, //!< f64 element type
i4, //!< i4 element type
i8, //!< i8 element type
i16, //!< i16 element type
i32, //!< i32 element type
i64, //!< i64 element type
u1, //!< binary element type
u2, //!< u2 element type
u3, //!< u3 element type
u4, //!< u4 element type
u6, //!< u6 element type
u8, //!< u8 element type
u16, //!< u16 element type
u32, //!< u32 element type
u64, //!< u64 element type
nf4, //!< nf4 element type
f8e4m3, //!< f8e4m3 element type
f8e5m2, //!< f8e5m2 element type
string, //!< string element type
f4e2m1, //!< f4e2m1 element type
f8e8m0, //!< f8e8m0 element type
boolean, //!< boolean element type
bf16, //!< bf16 element type
f16, //!< f16 element type
f32, //!< f32 element type
f64, //!< f64 element type
i4, //!< i4 element type
i8, //!< i8 element type
i16, //!< i16 element type
i32, //!< i32 element type
i64, //!< i64 element type
u1, //!< binary element type
u2, //!< u2 element type
u3, //!< u3 element type
u4, //!< u4 element type
u6, //!< u6 element type
u8, //!< u8 element type
u16, //!< u16 element type
u32, //!< u32 element type
u64, //!< u64 element type
nf4, //!< nf4 element type
f8e4m3, //!< f8e4m3 element type
f8e5m2, //!< f8e5m2 element type
string, //!< string element type
f4e2m1, //!< f4e2m1 element type
f8e8m0, //!< f8e8m0 element type
};

/// \brief Base class to define element type
Expand Down Expand Up @@ -137,12 +135,6 @@ class OPENVINO_API Type {

using TypeVector = std::vector<Type>;

/// \brief undefined element type
/// \ingroup ov_element_cpp_api
OPENVINO_SUPPRESS_DEPRECATED_START
OPENVINO_DEPRECATED("This type is deprecated and will be removed in 2026.0. Use dynamic instead.")
inline constexpr Type undefined(Type_t::undefined);
OPENVINO_SUPPRESS_DEPRECATED_END
/// \brief dynamic element type
/// \ingroup ov_element_cpp_api
inline constexpr Type dynamic(Type_t::dynamic);
Expand Down
4 changes: 0 additions & 4 deletions src/core/tests/element_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ TEST(element_type, from_string) {
EXPECT_EQ(element::Type("F4E2M1"), element::f4e2m1);
EXPECT_EQ(element::Type("f8e8m0"), element::f8e8m0);
EXPECT_EQ(element::Type("F8E8M0"), element::f8e8m0);
OPENVINO_SUPPRESS_DEPRECATED_START
EXPECT_EQ(element::Type("undefined"), element::undefined);
EXPECT_EQ(element::Type("UNSPECIFIED"), element::undefined);
OPENVINO_SUPPRESS_DEPRECATED_END
EXPECT_EQ(element::Type("dynamic"), element::dynamic);

EXPECT_THROW(element::Type("some_string"), ov::Exception);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,6 @@ def test_get_element_type_int32():
assert model.get_element_type(x_output_edge) == Type.i32

# get_element_type can return the concrete element type only for model inputs
# for other places, it returns undefined type
# for other places, it returns dynamic type
const_node = model.get_place_by_tensor_name(tensor_name="const_node")
assert model.get_element_type(const_node) == Type.undefined
assert model.get_element_type(const_node) == Type.dynamic
24 changes: 12 additions & 12 deletions src/plugins/intel_gpu/src/graph/impls/ocl_v2/utils/jitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,18 @@ void LayoutJitter::make_definitions(const layout& l, size_t shape_info_offset) {
}

JitConstants make_type_jit_constants(const std::string& name, const ov::element::Type& value) {
std::string type = "undefined";
std::string max_val = "undefined";
std::string min_val = "undefined";
std::string val_one = "undefined";
std::string val_zero = "undefined";
std::string to_type = "undefined";
std::string to_type_sat = "undefined";
std::string as_type = "undefined";
std::string max_func = "undefined";
std::string min_func = "undefined";
std::string abs_func = "undefined";
std::string type_size = "undefined";
std::string type = "dynamic";
std::string max_val = "dynamic";
std::string min_val = "dynamic";
std::string val_one = "dynamic";
std::string val_zero = "dynamic";
std::string to_type = "dynamic";
std::string to_type_sat = "dynamic";
std::string as_type = "dynamic";
std::string max_func = "dynamic";
std::string min_func = "dynamic";
std::string abs_func = "dynamic";
std::string type_size = "dynamic";
bool is_fp = false;
switch (value) {
case ov::element::i8:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ static std::set<std::string> get_element_type_names() {
ov::element::Type_t::u1,
ov::element::Type_t::boolean,
ov::element::Type_t::dynamic};
OPENVINO_SUPPRESS_DEPRECATED_START
element_types.emplace_back(element::undefined);
OPENVINO_SUPPRESS_DEPRECATED_END
std::set<std::string> result;
for (const auto& element_type : element_types) {
std::string element_name = element_type.get_type_name();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ std::shared_ptr<Node> makeElementwise(const std::shared_ptr<ov::Node> data, cons

std::shared_ptr<Operation> operation;
OPENVINO_SUPPRESS_DEPRECATED_START
if ((description.outPrecision == ov::element::undefined) || (description.outPrecision == ov::element::dynamic) ||
if ((description.outPrecision == ov::element::dynamic) ||
(description.outPrecision == data->get_output_element_type(0))) {
OPENVINO_SUPPRESS_DEPRECATED_END
operation = std::make_shared<Operation>(data, operationConst);
Expand Down
2 changes: 1 addition & 1 deletion tools/ovc/openvino/tools/ovc/moc_frontend/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def create_target_input_shapes(new_input_places):
"because the frontend does not support automatic type detection.".format(name))
# in case of cutting graph (or using custom inputs) and unspecified or dynamic type,
# the default type is fp32
if ov_type == Type.undefined or ov_type == Type.dynamic:
if ov_type == Type.dynamic:
ov_type = Type.f32
dtype = get_numpy_ctype(ov_type)

Expand Down
Loading