Skip to content

Commit

Permalink
support stablehlo in torch-mlir-opt binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Yancey1989 committed Sep 15, 2023
1 parent da990f4 commit 2a79743
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytorch_blade/tests/mhlo/torch-mlir-opt/torch-mlir-opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@
#include "torch-mlir/Conversion/MhloPasses.h"
#include "torch-mlir/InitAll.h"

#include "mhlo/IR/hlo_ops.h"
#include "mhlo/transforms/passes.h"
#include "stablehlo/dialect/Register.h"
using namespace mlir;

int main(int argc, char** argv) {
mlir::torch::registerTorchToMhloPasses();
registerAllPasses();
mlir::torch::registerAllPasses();
mlir::mhlo::registerStablehloLegalizeToHloPass();

DialectRegistry registry;
mlir::stablehlo::registerAllDialects(registry);
registerAllDialects(registry);
mlir::torch::registerAllDialects(registry);

Expand Down

0 comments on commit 2a79743

Please sign in to comment.