diff --git a/src/Dialect/ONNX/Transforms/Decompose.cpp b/src/Dialect/ONNX/Transforms/Decompose.cpp index 2bf3dc95f1..e2ffd745e3 100644 --- a/src/Dialect/ONNX/Transforms/Decompose.cpp +++ b/src/Dialect/ONNX/Transforms/Decompose.cpp @@ -946,7 +946,7 @@ class ReplaceCastLikeByCastPattern : public OpRewritePattern { // Replace Value res; - if (output.getType().cast().hasRank()) + if (mlir::cast(output.getType()).hasRank()) res = onnx_mlir::OnnxBuilder(rewriter, loc) .cast(input, saturate, TypeAttr::get(targetType)); else {