[Mlir-commits] [mlir] [mlir][sparse] introduce `sparse_tensor.extract_value` operation. (PR #101219)

Aart Bik llvmlistbot at llvm.org
Tue Jul 30 16:13:07 PDT 2024


================
@@ -1531,6 +1531,31 @@ def ExtractIterSpaceOp : SparseTensor_Op<"extract_iteration_space",
   let hasVerifier = 1;
 }
 
+def ExtractValOp : SparseTensor_Op<"extract_value", [
+    Pure,
+    TypesMatchWith<"result type matches element type of tensor",
+                   "tensor", "result",
+                   "::llvm::cast<TensorType>($_self).getElementType()">]> {
+  let summary = "Extracts a value from a sparse tensor.";
----------------
aartbik wrote:

can we make it more clear it extracts value using an iterator in name and summary?

other than that LGTM

https://github.com/llvm/llvm-project/pull/101219


More information about the Mlir-commits mailing list