[TORCH] Fix recompose off by -1 error (#2271)

pull/2272/head snapshot-20230628.883
Chi_Liu 2023-06-27 13:34:14 -07:00 committed by GitHub
parent 1eb63f33af
commit ddd0c06970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ public:
// Create indicesVector for IndexPut_Op by TorchNone and indexTensor
BaseTensorType tensorType = op->getResultTypes()[0].cast<BaseTensorType>();
SmallVector<Value> indicesVector(dim - 1, noneVal);
SmallVector<Value> indicesVector(dim, noneVal);
indicesVector.push_back(indexTensor);
Value indices = rewriter.create<PrimListConstructOp>(