|
MLIR 22.0.0git
|
#include "mlir/Dialect/Linalg/Passes.h"#include "mlir/Dialect/Linalg/IR/Linalg.h"#include "mlir/Dialect/Linalg/Transforms/Transforms.h"#include "mlir/Dialect/Linalg/Utils/Utils.h"#include "mlir/Transforms/DialectConversion.h"#include "mlir/Dialect/Linalg/Passes.h.inc"Go to the source code of this file.
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
Macros | |
| #define | GEN_PASS_DEF_CONVERTELEMENTWISETOLINALGPASS |
Functions | |
| static bool | isScalarLike (Type t) |
| static bool | isElementwiseMappableOpOnRankedTensors (Operation *op) |
| static SmallVector< Value, 4 > | getOrCreateOperandsMatchingResultTypes (OpBuilder &b, Operation *op) |
| 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: | |
| #define GEN_PASS_DEF_CONVERTELEMENTWISETOLINALGPASS |
Definition at line 17 of file ElementwiseToLinalg.cpp.
|
static |
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:
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 59 of file ElementwiseToLinalg.cpp.
References b, mlir::Operation::getLoc(), mlir::tensor::getMixedSizes(), mlir::Operation::getOperands(), mlir::Operation::getResultTypes(), and isElementwiseMappableOpOnRankedTensors().
Definition at line 27 of file ElementwiseToLinalg.cpp.
References mlir::Operation::getOperandTypes(), mlir::OpTrait::hasElementwiseMappableTraits(), and isScalarLike().
Referenced by getOrCreateOperandsMatchingResultTypes().
Definition at line 23 of file ElementwiseToLinalg.cpp.
Referenced by isElementwiseMappableOpOnRankedTensors().