From cf3ec2affdc7918b5717702f84f5405d740ae221 Mon Sep 17 00:00:00 2001 From: Kunwar Grover Date: Sun, 27 Oct 2024 18:23:14 +0000 Subject: [PATCH 1/2] [mlir][Vector] Depreciate vector.extractelement/vector.insertelement --- mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td index c5b08d6aa022b..c5a1a9e82625f 100644 --- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td @@ -638,11 +638,13 @@ def Vector_ExtractElementOp : Results<(outs AnyType:$result)> { let summary = "extractelement operation"; let description = [{ + Note: This operation is depreciated. Please use vector.extract insert. + Takes a 0-D or 1-D vector and a optional dynamic index position and extracts the scalar at that position. Note that this instruction resembles vector.extract, but is restricted to - 0-D and 1-D vectors and relaxed to dynamic indices. + 0-D and 1-D vectors. If the vector is 0-D, the position must be std::nullopt. @@ -824,11 +826,13 @@ def Vector_InsertElementOp : Results<(outs AnyVectorOfAnyRank:$result)> { let summary = "insertelement operation"; let description = [{ + Note: This operation is depreciated. Please use vector.insert instead. + Takes a scalar source, a 0-D or 1-D destination vector and a dynamic index position and inserts the source into the destination at the proper position. Note that this instruction resembles vector.insert, but is restricted to 0-D - and 1-D vectors and relaxed to dynamic indices. + and 1-D vectors. It is meant to be closer to LLVM's version: https://llvm.org/docs/LangRef.html#insertelement-instruction From 12efb83752f6fab04a25243638859cdad3ba4c33 Mon Sep 17 00:00:00 2001 From: Kunwar Grover Date: Wed, 19 Feb 2025 19:51:50 +0000 Subject: [PATCH 2/2] fix typos --- mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td index c5a1a9e82625f..8083b06df24b9 100644 --- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td +++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td @@ -638,7 +638,7 @@ def Vector_ExtractElementOp : Results<(outs AnyType:$result)> { let summary = "extractelement operation"; let description = [{ - Note: This operation is depreciated. Please use vector.extract insert. + Note: This operation is deprecated. Please use vector.extract insert. Takes a 0-D or 1-D vector and a optional dynamic index position and extracts the scalar at that position. @@ -826,7 +826,7 @@ def Vector_InsertElementOp : Results<(outs AnyVectorOfAnyRank:$result)> { let summary = "insertelement operation"; let description = [{ - Note: This operation is depreciated. Please use vector.insert instead. + Note: This operation is deprecated. Please use vector.insert instead. Takes a scalar source, a 0-D or 1-D destination vector and a dynamic index position and inserts the source into the destination at the proper position.