[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
This commit is contained in:
A. Unique TensorFlower 2021-06-02 05:33:45 -07:00 committed by TensorFlow MLIR Team
parent 557e56362e
commit 75a1c450ea
2 changed files with 1 additions and 8 deletions

View File

@ -75,8 +75,7 @@ std::unique_ptr<FunctionPass> createMoveUpDynamicBroadcastsForFusionPass();
/// - Lower rank specialization clusters to SCF and ranked operations. /// - Lower rank specialization clusters to SCF and ranked operations.
std::unique_ptr<FunctionPass> createRankSpecializationClusterPass(); std::unique_ptr<FunctionPass> createRankSpecializationClusterPass();
std::unique_ptr<FunctionPass> createRankSpecializationToSCFPass( std::unique_ptr<FunctionPass> createRankSpecializationToSCFPass(
int64_t max_target_rank); int64_t max_target_rank = 5);
std::unique_ptr<FunctionPass> createRankSpecializationToSCFPass();
std::unique_ptr<FunctionPass> createOptimizeMhloPass(); std::unique_ptr<FunctionPass> createOptimizeMhloPass();
std::unique_ptr<FunctionPass> createLowerComplexPass(); std::unique_ptr<FunctionPass> createLowerComplexPass();

View File

@ -651,8 +651,6 @@ struct LowerRankSpecializationClusterPattern
struct RankSpecializationToSCFPass struct RankSpecializationToSCFPass
: public RankSpecializationToSCFPassBase<RankSpecializationToSCFPass> { : public RankSpecializationToSCFPassBase<RankSpecializationToSCFPass> {
using RankSpecializationToSCFPassBase<
RankSpecializationToSCFPass>::RankSpecializationToSCFPassBase;
explicit RankSpecializationToSCFPass(int64_t max_target_rank) explicit RankSpecializationToSCFPass(int64_t max_target_rank)
: RankSpecializationToSCFPassBase< : RankSpecializationToSCFPassBase<
RankSpecializationToSCFPass>::RankSpecializationToSCFPassBase() { RankSpecializationToSCFPass>::RankSpecializationToSCFPassBase() {
@ -699,9 +697,5 @@ std::unique_ptr<FunctionPass> createRankSpecializationToSCFPass(
return std::make_unique<RankSpecializationToSCFPass>(max_target_rank); return std::make_unique<RankSpecializationToSCFPass>(max_target_rank);
} }
std::unique_ptr<FunctionPass> createRankSpecializationToSCFPass() {
return std::make_unique<RankSpecializationToSCFPass>();
}
} // namespace mhlo } // namespace mhlo
} // namespace mlir } // namespace mlir