diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td --- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td @@ -50,7 +50,7 @@ relatively straightforward one-to-one mapping from iteration lattices to combinations of for-loops, while-loops, and if-statements. Sparse tensor outputs that materialize uninitialized are handled with - insertions in pure lexicograph index order if all parallel loops + insertions in pure lexicographical index order if all parallel loops are outermost or using a 1-dimensional access pattern expansion (a.k.a. workspace) where feasible [Gustavson72,Bik96,Kjolstad19]. diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td --- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td @@ -197,12 +197,12 @@ Arguments<(ins AnyTensor:$tensor, StridedMemRefRankOf<[Index], [1]>:$indices, AnyType:$value)> { - string summary = "Inserts a value into given sparse tensor in lexicograph index order"; + string summary = "Inserts a value into given sparse tensor in lexicographical index order"; string description = [{ Inserts the given value at given indices into the underlying sparse storage format of the given tensor with the given indices. This operation can only be applied when a tensor materializes unintialized - with an `init` operation, the insertions occur in strict lexicographic + with an `init` operation, the insertions occur in strict lexicographical index order, and the final tensor is constructed with a `tensor` operation that has the `hasInserts` attribute set. diff --git a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp --- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp +++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp @@ -297,7 +297,7 @@ } void getValues(std::vector **out) override { *out = &values; } - /// Partially specialize lexicographic insertions based on template types. + /// Partially specialize lexicographical insertions based on template types. void lexInsert(uint64_t *cursor, V val) override { // First, wrap up pending insertion path. uint64_t diff = 0; @@ -972,7 +972,8 @@ IMPL_GETNEXT(getNextI16, int16_t) IMPL_GETNEXT(getNextI8, int8_t) -/// Helper to insert elements in lexicograph index order, one per value type. +/// Helper to insert elements in lexicographical index order, one per value +/// type. IMPL_LEXINSERT(lexInsertF64, double) IMPL_LEXINSERT(lexInsertF32, float) IMPL_LEXINSERT(lexInsertI64, int64_t)