Skip to content

Commit 356540a

Browse files
authored
[ONNX] Delete redundant dynamic dim check for result types (llvm#3942)
The dynamic has been supported by the code, the check is useless and will block the dynamic examples. This will fix nod-ai/AMD-SHARK-ModelDev#893
1 parent fee88fd commit 356540a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4487,11 +4487,6 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
44874487
SmallVector<Type> scanOutTypes;
44884488
for (unsigned i = numInits; i < resultTypes.size(); i++) {
44894489
auto scanOutTy = cast<Torch::ValueTensorType>(resultTypes[i]);
4490-
// TODO: Handle dynamic result types.
4491-
if (!scanOutTy.hasSizes() || !scanOutTy.areAllSizesKnown()) {
4492-
return rewriter.notifyMatchFailure(
4493-
binder.op, "Expects result type to be static");
4494-
}
44954490
Value sizeList =
44964491
createConstantIntList(binder, rewriter, scanOutTy.getSizes());
44974492
initVals.push_back(Torch::createInitTensor(rewriter, loc, scanOutTy,

0 commit comments

Comments
 (0)