From 68b7f53b25afd56a3c8c2e6b9c559dced34a81ee Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 24 Feb 2025 10:50:55 -0600 Subject: [PATCH] Drop a bug-for-bug forcing of approx for math.erf when --iree-codegen-gpu-native-math-precision is passed. Signed-off-by: Benoit Jacob --- .../src/iree/compiler/Codegen/Common/MathTransformPass.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/compiler/src/iree/compiler/Codegen/Common/MathTransformPass.cpp b/compiler/src/iree/compiler/Codegen/Common/MathTransformPass.cpp index 65a8e276eb91..7c4ebdc000eb 100644 --- a/compiler/src/iree/compiler/Codegen/Common/MathTransformPass.cpp +++ b/compiler/src/iree/compiler/Codegen/Common/MathTransformPass.cpp @@ -100,13 +100,6 @@ static bool predicateF32Cast(StringRef name, static bool predicateApprox(StringRef name, IREE::HAL::ExecutableTargetAttr target) { if (clNativeMathPrecision) { // Legacy. - if (name == math::ErfOp::getOperationName()) { - // The legacy implementation had a bug: it always applied polynomial - // approximation of math.erf, even when clNativeMathPrecision was passed. - // We actually have CI tests that rely on that bug: they pass - // clNativeMathPrecision but fail unless math.erf is approximated. - return true; - } return false; } StringRef acos = math::AcosOp::getOperationName();