From cfb61e820d7f822297cf8c727eacb3dbea605f07 Mon Sep 17 00:00:00 2001 From: Quinn Dawkins Date: Thu, 7 Dec 2023 11:57:21 -0500 Subject: [PATCH] [TorchToLinalg] Drop constexpr from ifs in argmin/max.dim See the discussion in https://discord.com/channels/689900678990135345/1062405112292712499/1182338050664185999 --- lib/Conversion/TorchToLinalg/Reduction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Conversion/TorchToLinalg/Reduction.cpp b/lib/Conversion/TorchToLinalg/Reduction.cpp index 80a77f66d086..289851cd3d27 100644 --- a/lib/Conversion/TorchToLinalg/Reduction.cpp +++ b/lib/Conversion/TorchToLinalg/Reduction.cpp @@ -187,7 +187,7 @@ class ConvertAtenMinMaxDimOp : public OpConversionPattern { Value resultVal, predicate; if (inElementType.isa()) { arith::CmpFPredicate predType; - if constexpr (isMax) { + if (isMax) { predType = arith::CmpFPredicate::OGT; resultVal = rewriter.create( nestedLoc, newValue, oldValue); @@ -201,7 +201,7 @@ class ConvertAtenMinMaxDimOp : public OpConversionPattern { newValue, oldValue); } else { arith::CmpIPredicate predType; - if constexpr (isMax) { + if (isMax) { predType = arith::CmpIPredicate::sgt; resultVal = rewriter.create(nestedLoc, newValue, oldValue);