diff --git a/lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp b/lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp index 963a5cfe419c..5fb17c79a65b 100644 --- a/lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp +++ b/lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp @@ -4487,11 +4487,6 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ( SmallVector scanOutTypes; for (unsigned i = numInits; i < resultTypes.size(); i++) { auto scanOutTy = cast(resultTypes[i]); - // TODO: Handle dynamic result types. - if (!scanOutTy.hasSizes() || !scanOutTy.areAllSizesKnown()) { - return rewriter.notifyMatchFailure( - binder.op, "Expects result type to be static"); - } Value sizeList = createConstantIntList(binder, rewriter, scanOutTy.getSizes()); initVals.push_back(Torch::createInitTensor(rewriter, loc, scanOutTy,