Skip to content

Commit

Permalink
review-comment
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Jacob <[email protected]>
  • Loading branch information
bjacob committed Feb 12, 2025
1 parent dfe388c commit 05c549f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(TORCH_MLIR_ENABLE_STABLEHLO)
list(APPEND LinkedLibs StablehloLinalgTransforms StablehloPasses)
endif()

if (TORCH_MLIR_ENABLE_TOSA)
if(TORCH_MLIR_ENABLE_TOSA)
list(APPEND LinkedLibs MLIRTosaDialect)
endif()

Expand Down
11 changes: 5 additions & 6 deletions lib/Dialect/TorchConversion/Transforms/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@
#include "torch-mlir/Conversion/TorchToSCF/TorchToSCF.h"
#include "torch-mlir/Conversion/TorchToTMTensor/TorchToTMTensor.h"
#include "torch-mlir/Conversion/TorchToTensor/TorchToTensor.h"
#ifdef TORCH_MLIR_ENABLE_TOSA
#include "torch-mlir/Conversion/TorchToTosa/TorchToTosa.h"
#endif
#include "torch-mlir/Dialect/Torch/Transforms/Passes.h"

#ifdef TORCH_MLIR_ENABLE_STABLEHLO
#include "stablehlo/transforms/Passes.h"
#include "torch-mlir/Conversion/TorchToStablehlo/TorchToStablehlo.h"
#endif
#include "torch-mlir/Dialect/Torch/Transforms/Passes.h"

using namespace mlir;
using namespace mlir::torch;
#ifdef TORCH_MLIR_ENABLE_TOSA
#include "torch-mlir/Conversion/TorchToTosa/TorchToTosa.h"
using namespace mlir::tosa;
#endif

using namespace mlir;
using namespace mlir::torch;

//===----------------------------------------------------------------------===//
// Pass registration
//===----------------------------------------------------------------------===//
Expand Down
7 changes: 4 additions & 3 deletions lib/InitAll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"
#ifdef TORCH_MLIR_ENABLE_TOSA
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#endif
#include "mlir/IR/Dialect.h"
#include "torch-mlir-dialects/Dialect/TMTensor/IR/TMTensorDialect.h"
#include "torch-mlir-dialects/Dialect/TMTensor/Transforms/Passes.h"
Expand All @@ -38,6 +35,10 @@
#include "stablehlo/transforms/Passes.h"
#endif

#ifdef TORCH_MLIR_ENABLE_TOSA
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#endif

void mlir::torch::registerAllDialects(mlir::DialectRegistry &registry) {
registry.insert<mlir::func::FuncDialect>();
registry.insert<mlir::torch::Torch::TorchDialect>();
Expand Down

0 comments on commit 05c549f

Please sign in to comment.