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.