summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Shape/IR/Shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Shape/IR/Shape.cpp')
-rw-r--r--mlir/lib/Dialect/Shape/IR/Shape.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index 1a056a0d597c..24302544ea06 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -920,7 +920,8 @@ LogicalResult mlir::shape::ConstShapeOp::inferReturnTypes(
DictionaryAttr attributes, OpaqueProperties properties, RegionRange regions,
SmallVectorImpl<Type> &inferredReturnTypes) {
Builder b(context);
- auto shape = attributes.getAs<DenseIntElementsAttr>("shape");
+ Properties *prop = properties.as<Properties *>();
+ DenseIntElementsAttr shape = prop->shape;
if (!shape)
return emitOptionalError(location, "missing shape attribute");
inferredReturnTypes.assign({RankedTensorType::get(