30 #define GEN_PASS_DEF_TOSATOLINALGNAMED
31 #include "mlir/Conversion/Passes.h.inc"
37 struct TosaToLinalgNamed
38 :
public impl::TosaToLinalgNamedBase<TosaToLinalgNamed> {
40 TosaToLinalgNamed(
const TosaToLinalgNamedOptions &
options)
41 : impl::TosaToLinalgNamedBase<TosaToLinalgNamed>(
options) {}
45 .
insert<arith::ArithDialect, linalg::LinalgDialect, math::MathDialect,
46 tensor::TensorDialect, scf::SCFDialect>();
49 void runOnOperation()
override {
53 tensor::TensorDialect, scf::SCFDialect>();
67 FunctionOpInterface func = getOperation();
68 TosaToLinalgNamedOptions
options;
69 options.preferConv2DKernelLayoutHWCF = preferConv2DKernelLayoutHWCF;
79 return std::make_unique<TosaToLinalgNamed>(
options);
static MLIRContext * getContext(OpFoldResult val)
static llvm::ManagedStatic< PassManagerOptions > options
This class describes a specific conversion target.
void addLegalDialect(StringRef name, Names... names)
Register the operations of the given dialects as legal.
void markUnknownOpDynamicallyLegal(const DynamicLegalityCallbackFn &fn)
Register unknown operations as dynamically legal.
void addIllegalOp(OperationName op)
Register the given operation as illegal, i.e.
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
Operation is the basic unit of execution within MLIR.
std::unique_ptr< Pass > createTosaToLinalgNamed(const TosaToLinalgNamedOptions &options=TosaToLinalgNamedOptions())
void populateTosaToLinalgNamedConversionPatterns(RewritePatternSet *patterns, const TosaToLinalgNamedOptions &options)
Populates conversion passes from TOSA dialect to Linalg named operations.
Include the generated interface declarations.
LogicalResult applyFullConversion(ArrayRef< Operation * > ops, const ConversionTarget &target, const FrozenRewritePatternSet &patterns, ConversionConfig config=ConversionConfig())
Apply a complete conversion on the given operations, and all nested operations.