[Mlir-commits] [mlir] [mlir][vector] Add vector.step operation (PR #96776)
Kiran Chandramohan
llvmlistbot at llvm.org
Wed Jul 3 04:55:06 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
----------------
kiranchandramohan wrote:
Nit: Is this 0 to N-1 or 0 to N?
https://github.com/llvm/llvm-project/pull/96776
More information about the Mlir-commits
mailing list