Go to the source code of this file.
|
| mlir |
| Include the generated interface declarations.
|
|
◆ GEN_PASS_DEF_CONVERTELEMENTWISETOLINALG
#define GEN_PASS_DEF_CONVERTELEMENTWISETOLINALG |
◆ getOrCreateOperandsMatchingResultTypes()
Given op
assumed isElementwiseMappableOpOnRankedTensors
, iterate over the result types and return a list of values such that, for each result type t
and value v
at the same index idx
:
v.getType() == t
- If an operand of
op
has type t
, let operand_first
be the first such operand. Thenv == operand_first
.
- Otherwise, v is a newly created
tensor::EmptyOp
with: a. Static and dynamic dims extracted from the first operand of op
. b. Elemental type equal to the elemental type of t
.
This is sufficient because ElementwiseMappable guarantees that "The static types of all vector (resp. tensor) operands and results must have the same shape".
Definition at line 48 of file ElementwiseToLinalg.cpp.
◆ isElementwiseMappableOpOnRankedTensors()
static bool isElementwiseMappableOpOnRankedTensors |
( |
Operation * |
op | ) |
|
|
static |