diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp --- a/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp +++ b/mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp @@ -664,7 +664,7 @@ Value sparse_tensor::genToPositions(OpBuilder &builder, Location loc, Value tensor, Level lvl) { const auto srcTp = getSparseTensorType(tensor); - const Type posTp = srcTp.getEncoding().getPosType(); + const Type posTp = srcTp.getPosType(); const Type memTp = get1DMemRefType(posTp, /*withLayout=*/false); return builder.create(loc, memTp, tensor, builder.getIndexAttr(lvl)); @@ -673,7 +673,7 @@ Value sparse_tensor::genToCoordinates(OpBuilder &builder, Location loc, Value tensor, Level lvl, Level cooStart) { const auto srcTp = getSparseTensorType(tensor); - const Type crdTp = srcTp.getEncoding().getCrdType(); + const Type crdTp = srcTp.getCrdType(); const Type memTp = get1DMemRefType(crdTp, /*withLayout=*/lvl >= cooStart); return builder.create(loc, memTp, tensor, builder.getIndexAttr(lvl)); @@ -682,7 +682,7 @@ Value sparse_tensor::genToCoordinatesBuffer(OpBuilder &builder, Location loc, Value tensor) { const auto srcTp = getSparseTensorType(tensor); - const Type crdTp = srcTp.getEncoding().getCrdType(); + const Type crdTp = srcTp.getCrdType(); const Type memTp = get1DMemRefType(crdTp, /*withLayout=*/false); return builder.create(loc, memTp, tensor); }