Skip to content

Commit be556ee

Browse files
[mlir][sparse] Fix typos in comments
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D158667
1 parent afd9e35 commit be556ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,14 +596,14 @@ class SparseCallConverter : public OpConversionPattern<func::CallOp> {
596596
if (failed(typeConverter->convertTypes(op.getResultTypes(), finalRetTy)))
597597
return failure();
598598

599-
// (1) Genereates new call with flattened return value.
599+
// (1) Generates new call with flattened return value.
600600
SmallVector<Value> flattened;
601601
flattenOperands(adaptor.getOperands(), flattened);
602602
auto newCall = rewriter.create<func::CallOp>(loc, op.getCallee(),
603603
finalRetTy, flattened);
604604
// (2) Create cast operation for sparse tensor returns.
605605
SmallVector<Value> castedRet;
606-
// Tracks the offset of current return value (of the orignal call)
606+
// Tracks the offset of current return value (of the original call)
607607
// relative to the new call (after sparse tensor flattening);
608608
unsigned retOffset = 0;
609609
// Temporal buffer to hold the flattened list of type for
@@ -692,7 +692,7 @@ class SparseCastConverter : public OpConversionPattern<tensor::CastOp> {
692692
}
693693
};
694694

695-
/// Sparse codgen rule for the alloc operator.
695+
/// Sparse codegen rule for the alloc operator.
696696
class SparseTensorAllocConverter
697697
: public OpConversionPattern<bufferization::AllocTensorOp> {
698698
public:
@@ -1234,7 +1234,7 @@ struct SparsePackOpConverter : public OpConversionPattern<PackOp> {
12341234
Value c0 = constantIndex(rewriter, loc, 0);
12351235
Value c1 = constantIndex(rewriter, loc, 1);
12361236
Value c2 = constantIndex(rewriter, loc, 2);
1237-
Value posBack = c0; // index to the last value in the postion array
1237+
Value posBack = c0; // index to the last value in the position array
12381238
Value memSize = c1; // memory size for current array
12391239

12401240
Level trailCOOStart = getCOOStart(stt.getEncoding());

0 commit comments

Comments
 (0)