Skip to content

Commit

Permalink
[MHLO] Init MHLO reduce-like op conversion (#1133)
Browse files Browse the repository at this point in the history
* [MHLO] init reduce-like op conversion from Torch to MHLO
Co-authored-by: Bairen Yi <[email protected]>
Co-authored-by: Jiawei Wu <[email protected]>
Co-authored-by: Tianyou Guo <[email protected]>
Co-authored-by: Xu Yan <[email protected]>
Co-authored-by: Ziheng Jiang <[email protected]>
  • Loading branch information
Vremold authored Aug 3, 2022
1 parent 0b23af2 commit 636f5ac
Show file tree
Hide file tree
Showing 5 changed files with 815 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Conversion/TorchToMhlo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ add_mlir_conversion_library(TorchMLIRTorchToMhlo
BasicOp.cpp
GatherOp.cpp
ViewLikeOps.cpp
ReductionOp.cpp

ADDITIONAL_HEADER_DIRS
${PROJECT_SOURCE_DIR}/include/torch-mlir/Conversion/TorchToMhlo
Expand Down
4 changes: 3 additions & 1 deletion lib/Conversion/TorchToMhlo/PopulatePatterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ void populateViewLikeOpPatternsAndLegality(TypeConverter &typeConverter,
void populateGatherOpPatternsAndLegality(TypeConverter &typeConverter,
RewritePatternSet &patterns,
ConversionTarget &target);

void populateReductionOpPatternsAndLegality(TypeConverter &typeConverter,
RewritePatternSet &patterns,
ConversionTarget &target);
} // namespace torch_to_mhlo
} // namespace torch
} // namespace mlir
Expand Down
Loading

0 comments on commit 636f5ac

Please sign in to comment.