diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp --- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp +++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp @@ -596,14 +596,14 @@ if (failed(typeConverter->convertTypes(op.getResultTypes(), finalRetTy))) return failure(); - // (1) Genereates new call with flattened return value. + // (1) Generates new call with flattened return value. SmallVector flattened; flattenOperands(adaptor.getOperands(), flattened); auto newCall = rewriter.create(loc, op.getCallee(), finalRetTy, flattened); // (2) Create cast operation for sparse tensor returns. SmallVector castedRet; - // Tracks the offset of current return value (of the orignal call) + // Tracks the offset of current return value (of the original call) // relative to the new call (after sparse tensor flattening); unsigned retOffset = 0; // Temporal buffer to hold the flattened list of type for @@ -692,7 +692,7 @@ } }; -/// Sparse codgen rule for the alloc operator. +/// Sparse codegen rule for the alloc operator. class SparseTensorAllocConverter : public OpConversionPattern { public: @@ -1234,7 +1234,7 @@ Value c0 = constantIndex(rewriter, loc, 0); Value c1 = constantIndex(rewriter, loc, 1); Value c2 = constantIndex(rewriter, loc, 2); - Value posBack = c0; // index to the last value in the postion array + Value posBack = c0; // index to the last value in the position array Value memSize = c1; // memory size for current array Level trailCOOStart = getCOOStart(stt.getEncoding());