Transformation passes¶
Overview¶
OpenVINO C++ API to work with OpenVINO transformations More…
// classes
class ov::pass::ConstantFolding;
class ov::pass::ConvertFP32ToFP16;
class ov::pass::GraphRewrite;
class ov::pass::LowLatency2;
class ov::pass::MakeStateful;
class ov::pass::Manager;
class ov::pass::MatcherPass;
class ov::pass::ModelPass;
class ov::pass::PassBase;
class ov::pass::PassConfig;
class ov::pass::Serialize;
class ov::pass::StreamSerialize;
class ov::pass::Validate;
class ov::pass::VisualizeTree;
// global functions
OPENVINO_API void ov::pass::disable_constant_folding(const std::shared_ptr<Node>& node);
OPENVINO_API bool ov::pass::constant_folding_is_disabled(const std::shared_ptr<Node>& node);
OPENVINO_API bool ov::pass::constant_folding_is_disabled(const Node \*const node);
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:
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)
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.