[Mlir-commits] [mlir] [mlir][vector] Add vector.step operation (PR #96776)
Cullen Rhodes
llvmlistbot at llvm.org
Wed Jul 3 05:07:07 PDT 2024
================
@@ -3017,6 +3017,35 @@ def Vector_ScanOp :
let hasVerifier = 1;
}
+//===----------------------------------------------------------------------===//
+// VectorStepOp
+//===----------------------------------------------------------------------===//
+
+def Vector_StepOp : Vector_Op<"step", [Pure]> {
+ let summary = "A linear sequence of values from 0 to N";
+ let description = [{
+ A `step` operation produces an index vector, i.e. a 1-D vector of values of
+ index type that represents a linear sequence from 0 to N, where N is the
+ number of elements in the `result` vector.
+
+ Supports fixed-width and scalable vectors. For a fixed-width `step` vector,
+ the canonical representation is `arith.constant dense<[0, .., N]>`. A
----------------
c-rhodes wrote:
N-1, fixed thanks!
https://github.com/llvm/llvm-project/pull/96776
More information about the Mlir-commits
mailing list