[Mlir-commits] [mlir] [mlir][sparse] implement loose-compressed/2:4 on direct IR codegen path (PR #71461)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Nov 6 15:48:14 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 03529b99b36788ca836b7ce238ea9400ce89847b b4b13edfccf2ea5c606ff4f8e556c34e99537ac5 -- mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
index c751cfa3c..08c38394a 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
@@ -407,7 +407,8 @@ static void genEndInsert(OpBuilder &builder, Location loc,
builder.setInsertionPointAfter(loop);
}
} else {
- assert(isDenseDLT(dlt) || isLooseCompressedDLT(dlt) || isSingletonDLT(dlt) || is2OutOf4DLT(dlt));
+ assert(isDenseDLT(dlt) || isLooseCompressedDLT(dlt) ||
+ isSingletonDLT(dlt) || is2OutOf4DLT(dlt));
}
}
}
@@ -497,7 +498,8 @@ public:
Value two = constantIndex(builder, loc, 2);
parentPos = builder.create<arith::MulIOp>(loc, parentPos, two);
}
- parentPos = genCompressed(builder, loc, desc, coords, value, parentPos, lvl);
+ parentPos =
+ genCompressed(builder, loc, desc, coords, value, parentPos, lvl);
} else if (isSingletonDLT(dlt) || is2OutOf4DLT(dlt)) {
// Create:
// coordinates[lvl].push_back(coords[lvl])
@@ -1498,7 +1500,8 @@ struct SparseNewConverter : public OpConversionPattern<NewOp> {
// Now construct the dim2lvl and lvl2dim buffers.
Value dim2lvlBuffer;
Value lvl2dimBuffer;
- genMapBuffers(rewriter, loc, dstTp, dimShapesValues, dimSizesBuffer, dim2lvlBuffer, lvl2dimBuffer);
+ genMapBuffers(rewriter, loc, dstTp, dimShapesValues, dimSizesBuffer,
+ dim2lvlBuffer, lvl2dimBuffer);
// Read the COO tensor data.
MutSparseTensorDescriptor desc(dstTp, fields);
``````````
</details>
https://github.com/llvm/llvm-project/pull/71461
More information about the Mlir-commits
mailing list