MLIR  19.0.0git
Static Public Member Functions | List of all members
mlir::OpTrait::ResultsBroadcastableShape< ConcreteType > Class Template Reference

Trait for ops that are known to have broadcast compatible operands and result types. More...

#include "mlir/Dialect/Traits.h"

+ Inheritance diagram for mlir::OpTrait::ResultsBroadcastableShape< ConcreteType >:

Static Public Member Functions

static LogicalResult verifyTrait (Operation *op)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, ResultsBroadcastableShape >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 

Detailed Description

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

Trait for ops that are known to have broadcast compatible operands and result types.

Specifically, starting from the most varying dimension, each dimension pair of the operands' shapes should either be the same or one of them is one. Also, the results's shapes 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<?x2xf32> and tensor<2xf32> as operand types and tensor<5x3x2xi16> as the result type has broadcast compatible operands ns result types.

Definition at line 88 of file Traits.h.

Member Function Documentation

◆ verifyTrait()

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

Definition at line 91 of file Traits.h.


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