MLIR
20.0.0git
|
This trait tags Elementwise
operatons that can be systematically tensorized.
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, Tensorizable > | |
Operation * | getOperation () |
Return the ultimate Operation being worked on. More... | |
This trait tags Elementwise
operatons that can be systematically tensorized.
All scalar operands and results are then replaced by tensors with the respective element type. Semantically, this is the operation on multiple elements simultaneously. See also Vectorizable
.
Rationale: Provide the reverse to Scalarizable
which, when chained together, allows reasoning about the relationship between the tensor and vector case. Additionally, it permits reasoning about promoting scalars to tensors via broadcasting in cases like select_scalar_pred
below.
Examples:
can be tensorized to
can be tensorized to
Definition at line 1490 of file OpDefinition.h.
|
inlinestatic |
Definition at line 1491 of file OpDefinition.h.