Class ov::descriptor::Tensor#

class Tensor#

Compile-time descriptor of a first-class value that is a tensor.

Public Functions

Tensor(const element::Type &element_type, const PartialShape &pshape, const std::unordered_set<std::string> &names = {})#

Creates Tensor descriptor.

Parameters:
  • element_type – Element type

  • pshape – Partial shape of tensor

  • namesTensor names (optional default empty).

const std::string &get_any_name() const#

Gets any tensor name. Throws if tensor has no names.

const std::unordered_set<std::string> &get_names() const#

Gets tensor names.

void set_names(const std::unordered_set<std::string> &names)#

Set new names.

Parameters:

names – Names to set.

void add_names(const std::unordered_set<std::string> &names)#

Adds new names to tensor.

Parameters:

names – new names to be added.

void set_lower_value(const ov::Tensor &value)#

sets lower bound value description

void set_upper_value(const ov::Tensor &value)#

sets upper bound value description

void set_value_symbol(const TensorSymbol &value_symbol)#

sets value symbol description

void invalidate_values()#

unsets bound value descriptions

const element::Type &get_element_type() const#

Gets element type.

const Shape &get_shape() const#

Gets shape. Throw if Tensor’s shape is not static.

const PartialShape &get_partial_shape() const#

Gets partial shape.

const ov::Tensor &get_lower_value() const#

gets lower bound value description

const ov::Tensor &get_upper_value() const#

gets upper bound value description

TensorSymbol get_value_symbol() const#

gets symbol value description

bool has_and_set_bound() const#

checks if lower and upper bound are set and point to the same Tensor

size_t size() const#

Get Tensor size in bytes.

Returns:

Size in bytes.

RTMap &get_rt_info()#

Gets runtime informations.

Returns:

Runtime information map which can be modified.

const RTMap &get_rt_info() const#

Gets runtime informations.

Returns:

Read only runtime information map.

void clone_from(const Tensor &other)#

Clones Tensor from the other.

Parameters:

otherTensor used to clone its properties.