diff --git a/lib/Conversion/TorchToTcp/TcpCustomOp.cpp b/lib/Conversion/TorchToTcp/TcpCustomOp.cpp index a34bd87..85b0c39 100644 --- a/lib/Conversion/TorchToTcp/TcpCustomOp.cpp +++ b/lib/Conversion/TorchToTcp/TcpCustomOp.cpp @@ -299,15 +299,11 @@ class ConvertAtenViewOp : public OpConversionPattern { torch_to_tcp::TorchToTcpCustomOpConversionHelper helper{op, rewriter, getTypeConverter()}; Value self = adaptor.getSelf(); - auto srcType = self.getType().cast(); - auto resultType = - getTypeConverter()->convertType(op.getType()).cast(); - SmallVector size; - // static shape will be handled through TOSA dialect - if (matchPattern(op.getSize(), m_TorchListOfConstantInts(size)) && - srcType.hasStaticShape() && resultType.hasStaticShape()) - return rewriter.notifyMatchFailure(op, "only dynamic shape is supported"); + // static size array will be handled through TOSA dialect + if (matchPattern(op.getSize(), m_TorchListOfConstantInts(size))) + return rewriter.notifyMatchFailure(op, + "only non-constant size is supported"); helper.addOperand("self", self); Operation *primListOp = op.getSize().getDefiningOp();