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 75d34c9 commit b11026aCopy full SHA for b11026a
mlir/lib/Bindings/Python/IRAttributes.cpp
@@ -1101,10 +1101,11 @@ class PyDenseElementsAttribute
1101
template <typename Type>
1102
py::buffer_info bufferInfo(MlirType shapedType,
1103
const char *explicitFormat = nullptr) {
1104
- // Buffer is configured for read-only access below
+ intptr_t rank = mlirShapedTypeGetRank(shapedType);
1105
+ // Prepare the data for the buffer_info.
1106
+ // Buffer is configured for read-only access below.
1107
Type *data = static_cast<Type *>(
1108
const_cast<void *>(mlirDenseElementsAttrGetRawData(*this)));
- intptr_t rank = mlirShapedTypeGetRank(shapedType);
1109
// Prepare the shape for the buffer_info.
1110
SmallVector<intptr_t, 4> shape;
1111
for (intptr_t i = 0; i < rank; ++i)
0 commit comments