My Project
Static Public Member Functions | List of all members
mlir::OpTrait::BroadcastableTwoOperandsOneResult< ConcreteType > Class Template Reference

#include <Traits.h>

Inheritance diagram for mlir::OpTrait::BroadcastableTwoOperandsOneResult< ConcreteType >:
Inheritance graph
[legend]
Collaboration diagram for mlir::OpTrait::BroadcastableTwoOperandsOneResult< ConcreteType >:
Collaboration graph
[legend]

Static Public Member Functions

static LogicalResult verifyTrait (Operation *op)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, BroadcastableTwoOperandsOneResult >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 
- Static Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, BroadcastableTwoOperandsOneResult >
static LogicalResult verifyTrait (Operation *op)
 
static AbstractOperation::OperationProperties getTraitProperties ()
 

Detailed Description

template<typename ConcreteType>
class mlir::OpTrait::BroadcastableTwoOperandsOneResult< ConcreteType >

This class provides the API for ops that are known to have broadcast- compatible operand and result types. Specifically, starting from the most varying dimension, each dimension pair of the two operands' types should either be the same or one of them is one. Also, the result type should have the corresponding dimension equal to the larger one, if known. Shapes are checked partially if ranks or dimensions are not known. For example, an op with tensor<? x 2 x f32> and tensor <2 x f32> as operand types and tensor<3 x 2 x f32> as the result type is broadcast-compatible.

Ths trait assumes the op has two operands and one result, and it asserts if the pre-condition is not satisfied.

Member Function Documentation

◆ verifyTrait()

template<typename ConcreteType >
static LogicalResult mlir::OpTrait::BroadcastableTwoOperandsOneResult< ConcreteType >::verifyTrait ( Operation op)
inlinestatic

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