From e85def790cfc01ff27b450144a24096db5eafb09 Mon Sep 17 00:00:00 2001 From: Chi_Liu Date: Thu, 16 Feb 2023 09:10:11 -0800 Subject: [PATCH] [TOSA] Add todtype f64 and i1 to f32 support (#1845) --- lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp b/lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp index 6ecb3f0ca..158350630 100644 --- a/lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp +++ b/lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp @@ -231,6 +231,9 @@ static LogicalResult checkValidityOfCast(Type src, Type dest) { (src.isInteger(32) && dest.isF32()) || (src.isInteger(8) && dest.isInteger(1)) || (src.isInteger(1) && dest.isInteger(64)) || + (src.isInteger(1) && dest.isF32()) || + (src.isF32() && dest.isF64()) || + (src.isF64() && dest.isF32()) || (src.isF32() && dest.isInteger(8)) || (src.isF32() && dest.isInteger(1))) { return success();