From 498ab997cd87e4f0e7184d9f37272312a1563bf5 Mon Sep 17 00:00:00 2001 From: Yuanqiang Liu Date: Sun, 7 Apr 2024 17:01:58 +0800 Subject: [PATCH] [Stablehlo] lowering aten.log1p to stablehlo.log_plus_one (#3110) --- lib/Conversion/TorchToStablehlo/Basic.cpp | 1 + projects/pt1/e2e_testing/xfail_sets.py | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/Conversion/TorchToStablehlo/Basic.cpp b/lib/Conversion/TorchToStablehlo/Basic.cpp index a55ca6a24..1a2a6cfc3 100644 --- a/lib/Conversion/TorchToStablehlo/Basic.cpp +++ b/lib/Conversion/TorchToStablehlo/Basic.cpp @@ -1784,6 +1784,7 @@ void mlir::torch::torch_to_stablehlo::populateBasicOpPatternsAndLegality( patterns.add>(typeConverter, \ context) INSERT_UNARY_FPONLY_PATTERN(AtenLogOp, stablehlo::LogOp); + INSERT_UNARY_FPONLY_PATTERN(AtenLog1pOp, stablehlo::Log1pOp); INSERT_UNARY_FPONLY_PATTERN(AtenExpOp, stablehlo::ExpOp); INSERT_UNARY_FPONLY_PATTERN(AtenSqrtOp, stablehlo::SqrtOp); INSERT_UNARY_FPONLY_PATTERN(AtenRsqrtOp, stablehlo::RsqrtOp); diff --git a/projects/pt1/e2e_testing/xfail_sets.py b/projects/pt1/e2e_testing/xfail_sets.py index 6efd56ce2..ee4632b06 100644 --- a/projects/pt1/e2e_testing/xfail_sets.py +++ b/projects/pt1/e2e_testing/xfail_sets.py @@ -887,6 +887,7 @@ STABLEHLO_PASS_SET = { "ViewOffsetTestStaticModule_basic", "ViewTwoFiveThreeStaticModule_basic", "ViewTwoToThreeStaticModule_basic", + "ElementwiseLog1pModule_basic", } STABLEHLO_CRASHING_SET = {