//===- 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 // Also available under a BSD-style license. See LICENSE. // //===----------------------------------------------------------------------===// #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)); }