Class ov::op::v14::ConvertPromoteTypes#

class ConvertPromoteTypes : public ov::op::Op#

Elementwise operation that promote and convert input types to one common datatype.

Public Functions

ConvertPromoteTypes() = default#

Constructs operation that promote and convert input types to one common datatype.

ConvertPromoteTypes(const Output<Node> &input_0, const Output<Node> &input_1, const bool promote_unsafe = false, const bool pytorch_scalar_promotion = false, const element::Type &u64_integer_promotion_target = element::f32)#

Constructs operation that promote and convert input types to one common datatype.

Parameters:
  • input_0Node with datatype to be promoted.

  • input_1Node with datatype to be promoted.

  • promote_unsafe – Bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

  • pytorch_scalar_promotion – Bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

  • u64_integer_promotion_target – Element type attribute to select promotion result for u64 and signed integers.

virtual void validate_and_infer_types() override#

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

bool get_pytorch_scalar_promotion() const#

Get bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

void set_pytorch_scalar_promotion(bool pytorch_scalar_promotion)#

Set bool attribute whether to promote scalar input to type provided by non-scalar input when number format is matching.

bool get_promote_unsafe() const#

Get bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

void set_promote_unsafe(bool promote_unsafe)#

Set bool attribute whether to allow promotions that might result in bit-widening, precision loss and undefined behaviors.

const element::Type &get_u64_integer_promotion_target() const#

Get element type attribute to select promotion result for u64 and signed integers.

void set_u64_integer_promotion_target(const element::Type &u64_integer_promotion_target)#

Set element type attribute to select promotion result for u64 and signed integers.