From 7cb2db627978b0a802212f08a80cc82805cf5704 Mon Sep 17 00:00:00 2001 From: Ze Zhang Date: Mon, 23 Oct 2023 17:04:30 -0700 Subject: [PATCH] Update dtype check in torch-to-tosa clamp op (#2529) As titled. --------- Co-authored-by: Ze Zhang --- lib/Conversion/TorchToTosa/TorchToTosa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Conversion/TorchToTosa/TorchToTosa.cpp b/lib/Conversion/TorchToTosa/TorchToTosa.cpp index c2c73708d..e123522a4 100644 --- a/lib/Conversion/TorchToTosa/TorchToTosa.cpp +++ b/lib/Conversion/TorchToTosa/TorchToTosa.cpp @@ -3986,7 +3986,7 @@ LogicalResult ConvertAtenOp::matchAndRewrite( IntegerAttr min_int, max_int; FloatAttr min_fp, max_fp; - if (selfType.getElementType().isa()) { + if (op.getMin().getType().isa()) { double fp_min, fp_max; if (!matchPattern(op.getMin(), m_TorchConstantFloat(&fp_min))) return rewriter.notifyMatchFailure(