#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include <iterator>
#include <memory>
#include <utility>
namespace mlir {
#define GEN_PASS_DEF_LINALGDETENSORIZEPASS
#include "mlir/Dialect/Linalg/Passes.h.inc"
}
usingnamespacemlir;
usingnamespacemlir::linalg;
static Value sourceMaterializationCallback(OpBuilder &builder, Type type,
ValueRange inputs, Location loc) { … }
namespace {
bool canBeDetensored(TensorType tensorType) { … }
bool shouldBeDetensored(Operation *op, TypeConverter typeConverter) { … }
class DetensorizeGenericOp : public OpConversionPattern<GenericOp> { … };
struct FunctionNonEntryBlockConversion
: public OpInterfaceConversionPattern<FunctionOpInterface> { … };
class DetensorizeTypeConverter : public TypeConverter { … };
struct LinalgDetensorize
: public impl::LinalgDetensorizePassBase<LinalgDetensorize> { … };
}