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 @@ -239,7 +239,7 @@ dimension (e.g. a full row for matrices). The added array and count are used to store new indices when a false value is encountered in the filled array. All arrays should be allocated before the loop (possibly even shared between - loops in a future optimization) so that their *dense* intitialization can be + loops in a future optimization) so that their *dense* initialization can be amortized over many iterations. Setting and resetting the dense arrays in the loop nest itself is kept *sparse* by only iterating over set elements through an indirection using the added array, so that the operations are diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir @@ -26,7 +26,7 @@ !Filename = type !llvm.ptr -#SparseMatrix = #sparse_tensor.encoding<{ +#SparseTensor = #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed", "compressed" ] }> @@ -51,14 +51,14 @@ // Computes Matricized Tensor Times Khatri-Rao Product (MTTKRP) kernel. See // http://tensor-compiler.org/docs/data_analytics/index.html. // - func @kernel_mttkrp(%argb: tensor, + func @kernel_mttkrp(%argb: tensor, %argc: tensor, %argd: tensor, %arga: tensor {linalg.inplaceable = true}) -> tensor { %0 = linalg.generic #mttkrp ins(%argb, %argc, %argd: - tensor, tensor, tensor) + tensor, tensor, tensor) outs(%arga: tensor) { ^bb(%b: f64, %c: f64, %d: f64, %a: f64): %0 = arith.mulf %b, %c : f64 @@ -87,7 +87,7 @@ // Read the sparse B input from a file. %fileName = call @getTensorFilename(%c0) : (index) -> (!Filename) %b = sparse_tensor.new %fileName - : !Filename to tensor + : !Filename to tensor // Initialize dense C and D inputs and dense output A. %cdata = memref.alloc(%c3, %c5) : memref @@ -124,7 +124,7 @@ // Call kernel. %0 = call @kernel_mttkrp(%b, %c, %d, %a) - : (tensor, + : (tensor, tensor, tensor, tensor) -> tensor // Print the result for verification. @@ -141,7 +141,7 @@ memref.dealloc %adata : memref memref.dealloc %cdata : memref memref.dealloc %ddata : memref - sparse_tensor.release %b : tensor + sparse_tensor.release %b : tensor return }