From 75a1c450eaa7c4ab558b8d6c3e5a0f506e8acd09 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 2 Jun 2021 05:33:45 -0700 Subject: [PATCH] [MLIR][KernelGen] Fix Windows build failure Fix usage of default constructor. Instead, always use the parameterized constructor and make the maximum supported rank explicit. PiperOrigin-RevId: 377037155 --- include/mlir-hlo/Dialect/mhlo/transforms/passes.h | 3 +-- lib/Dialect/mhlo/transforms/rank_specialization.cc | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/mlir-hlo/Dialect/mhlo/transforms/passes.h b/include/mlir-hlo/Dialect/mhlo/transforms/passes.h index 269424b..6f662d1 100644 --- a/include/mlir-hlo/Dialect/mhlo/transforms/passes.h +++ b/include/mlir-hlo/Dialect/mhlo/transforms/passes.h @@ -75,8 +75,7 @@ std::unique_ptr createMoveUpDynamicBroadcastsForFusionPass(); /// - Lower rank specialization clusters to SCF and ranked operations. std::unique_ptr createRankSpecializationClusterPass(); std::unique_ptr createRankSpecializationToSCFPass( - int64_t max_target_rank); -std::unique_ptr createRankSpecializationToSCFPass(); + int64_t max_target_rank = 5); std::unique_ptr createOptimizeMhloPass(); std::unique_ptr createLowerComplexPass(); diff --git a/lib/Dialect/mhlo/transforms/rank_specialization.cc b/lib/Dialect/mhlo/transforms/rank_specialization.cc index 60379b1..b00cde4 100644 --- a/lib/Dialect/mhlo/transforms/rank_specialization.cc +++ b/lib/Dialect/mhlo/transforms/rank_specialization.cc @@ -651,8 +651,6 @@ struct LowerRankSpecializationClusterPattern struct RankSpecializationToSCFPass : public RankSpecializationToSCFPassBase { - using RankSpecializationToSCFPassBase< - RankSpecializationToSCFPass>::RankSpecializationToSCFPassBase; explicit RankSpecializationToSCFPass(int64_t max_target_rank) : RankSpecializationToSCFPassBase< RankSpecializationToSCFPass>::RankSpecializationToSCFPassBase() { @@ -699,9 +697,5 @@ std::unique_ptr createRankSpecializationToSCFPass( return std::make_unique(max_target_rank); } -std::unique_ptr createRankSpecializationToSCFPass() { - return std::make_unique(); -} - } // namespace mhlo } // namespace mlir