We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df335b0 commit 404d0e9Copy full SHA for 404d0e9
mlir/lib/Bindings/Python/IRAttributes.cpp
@@ -1102,11 +1102,11 @@ class PyDenseElementsAttribute
1102
unpackedBooleans = unpackedBooleans[py::slice(0, numBooleans, 1)];
1103
unpackedBooleans = equalFunc(unpackedBooleans, 1);
1104
1105
- std::vector<intptr_t> shape;
1106
MlirType shapedType = mlirAttributeGetType(*this);
1107
intptr_t rank = mlirShapedTypeGetRank(shapedType);
+ std::vector<intptr_t> shape(rank);
1108
for (intptr_t i = 0; i < rank; ++i) {
1109
- shape.push_back(mlirShapedTypeGetDimSize(shapedType, i));
+ shape[i] = mlirShapedTypeGetDimSize(shapedType, i);
1110
}
1111
unpackedBooleans = reshapeFunc(unpackedBooleans, shape);
1112
0 commit comments