mirror of https://github.com/llvm/torch-mlir
28 lines
910 B
C++
28 lines
910 B
C++
|
//===- torch-mlir-opt.cpp - MLIR Optimizer Driver -------------------------===//
|
||
|
//
|
||
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||
|
// See https://llvm.org/LICENSE.txt for license information.
|
||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
#include "mlir/InitAllDialects.h"
|
||
|
#include "mlir/InitAllPasses.h"
|
||
|
#include "mlir/Support/MlirOptMain.h"
|
||
|
#include "torch-mlir/InitAll.h"
|
||
|
|
||
|
using namespace mlir;
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
|
registerAllPasses();
|
||
|
mlir::torch::registerAllPasses();
|
||
|
|
||
|
DialectRegistry registry;
|
||
|
registerAllDialects(registry);
|
||
|
mlir::torch::registerAllDialects(registry);
|
||
|
|
||
|
return mlir::asMainReturnCode(
|
||
|
mlir::MlirOptMain(argc, argv, "MLIR modular optimizer driver\n", registry,
|
||
|
/*preloadDialectsInContext=*/false));
|
||
|
}
|