[Stablehlo] lowering aten.round to stablehlo.round_nearest_even (#3011)

pull/2996/head
Yuanqiang Liu 2024-03-12 08:58:20 +08:00 committed by GitHub
parent e78c99e74e
commit ad6159c7cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -1779,6 +1779,7 @@ void mlir::torch::torch_to_stablehlo::populateBasicOpPatternsAndLegality(
INSERT_UNARY_FPONLY_PATTERN(AtenCosOp, stablehlo::CosineOp);
INSERT_UNARY_FPONLY_PATTERN(AtenCeilOp, stablehlo::CeilOp);
INSERT_UNARY_FPONLY_PATTERN(AtenFloorOp, stablehlo::FloorOp);
INSERT_UNARY_FPONLY_PATTERN(AtenRoundOp, stablehlo::RoundNearestEvenOp);
#undef INSERT_UNARY_FPONLY_PATTERN
#define INSERT_CONSTANT_FILL_PATTERN(AtenOp, fillVal) \

View File

@ -405,6 +405,8 @@ STABLEHLO_PASS_SET = {
"AtenItemIntOpModule_basic",
"AtenMmFloatTypes_basic",
"AtenMmIntTypes_basic",
"AtenRoundFloatHalfToEvenModule_basic",
"AtenRoundFloatModule_basic",
"AtenRoundIntModule_basic",
"AtenSubFloatModule_basic",
"AtenToDeviceModule_basic",