MLIR
20.0.0git
|
This trait tags Elementwise
operatons that can be systematically scalarized.
More...
#include "mlir/IR/OpDefinition.h"
Static Public Member Functions | |
static LogicalResult | verifyTrait (Operation *op) |
Additional Inherited Members | |
Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, Scalarizable > | |
Operation * | getOperation () |
Return the ultimate Operation being worked on. More... | |
This trait tags Elementwise
operatons that can be systematically scalarized.
All vector/tensor operands and results are then replaced by scalars of the respective element type. Semantically, this is the operation on a single element of the vector/tensor.
Rationale: Allow to define the vector/tensor semantics of elementwise operations based on the same op's behavior on scalars. This provides a constructive procedure for IR transformations to, e.g., create scalar loop bodies from tensor ops.
Example:
can be scalarized to
Definition at line 1429 of file OpDefinition.h.
|
inlinestatic |
Definition at line 1430 of file OpDefinition.h.