Transformation passes

Overview

OpenVINO C++ API to work with OpenVINO transformations More…

Detailed Documentation

OpenVINO C++ API to work with OpenVINO transformations

Global Functions

OPENVINO_API void ov::pass::disable_constant_folding(const std::shared_ptr<Node>& node)

this method disables constant folding for given node. Under constant folding we consider ConstantFolding transformation, so other type of constant folding like get_constant_from_source doesn’t work with this attribute. Also before using this attribute please consider two corner cases:

  1. If for sub-graph like ShapeOf->ShapeOf we disable cf for first ShapeOf node, it doesn’t spread to the second ShapeOf, so the entire sub-graph will be folded. (In case if first ShapeOf has exactly one consumer)

  2. If node with disable_constant_folding was replaced with another node, the attribute will be lost because it is not copyable.

OPENVINO_API bool ov::pass::constant_folding_is_disabled(const std::shared_ptr<Node>& node)

Check if constant folding is disabled on Node.

Parameters:

node

Smart pointer to the node.

Returns:

true if attribute constant folding set otherwise false.

OPENVINO_API bool ov::pass::constant_folding_is_disabled(const Node \*const node)

Check if constant folding is disabled on Node.

Parameters:

node

Pointer to the node.

Returns:

true if attribute constant folding set otherwise false.