enum dnnl::graph::logical_tensor::property_type

enum dnnl::graph::logical_tensor::property_type#

Overview#

Tensor property. More…

#include <dnnl_graph.hpp>

enum property_type
{
    undef       = dnnl_graph_tensor_property_undef,
    variable    = dnnl_graph_tensor_property_variable,
    constant    = dnnl_graph_tensor_property_constant,
    host_scalar = dnnl_graph_tensor_property_host_scalar,
};

Detailed Documentation#

Tensor property.

Enum Values#

undef

Default tensor property. It has the same effect as variable. TODO(lvtao): remove undef and make variable the default property type in a future release.

variable

Variable means the tensor may be changed during computation or between different iterations.

constant

Constant means the tensor will keep unchanged during computation and between different iterations. It’s useful for the library to apply optimizations for constant tensors or cache constant tensors inside the library. For example, constant weight tensors in inference scenarios.

host_scalar

Host scalar means the tensor will be a 0-D scalar tensor on host. It should be used with a CPU engine when creating the tensor.