Public Member Functions
ngraph::pass::ConvertPrecision Class Reference

ConvertPrecision transformation convert precision for entire ngraph::Function List of supported precision conversion: FROM -> TO u8 -> i32 u16 -> i32 u32 -> i32 u64 -> i32 i64 -> i32 f16 -> f32 bool -> u8 bool -> i32. More...

#include <convert_precision.hpp>

Inheritance diagram for ngraph::pass::ConvertPrecision:

Public Member Functions

 ConvertPrecision (ngraph::element::Type_t from, ngraph::element::Type_t to)
 
bool run_on_function (std::shared_ptr< Function > f) override
 

Detailed Description

ConvertPrecision transformation convert precision for entire ngraph::Function List of supported precision conversion: FROM -> TO u8 -> i32 u16 -> i32 u32 -> i32 u64 -> i32 i64 -> i32 f16 -> f32 bool -> u8 bool -> i32.

For all operations from opset1-opset4 this conversions can be applied without adding Conversion operations. That is possible because all operations that produces "FROM" type can produce "TO" type. And for this operations we have created special fuse_type_into_<type> functoin (can be found in cpp file) that performs type fusion into operation.

List of operations that are supported by this transformations for i64 -> i32 conversion: opset4::Parameter opset4::Convert opset4::ShapeOf opset3::NonMaxSuppression opset4::NonMaxSuppression opset4::TopK opset4::NonZero opset4::Bucketize

List of operations that are supported by this transformations for bool -> u8 conversion: LogicalAnd LogicalNot LogicalOr LogicalXor ReduceLogicalAnd ReduceLogicalOr Equal NotEqual Greater GreaterEqual Less LessEqual


The documentation for this class was generated from the following file: