Skip to content

Commit e8acf0b

Browse files
committed
clarify rotate direction
1 parent 74d31ac commit e8acf0b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/enzyme_ad/jax/Dialect/EnzymeXLAOps.td

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,15 @@ def AffineScopeOp : EnzymeXLA_Op<"scope", [
344344

345345
def RotateOp : EnzymeXLA_Op<"rotate", [Pure, SameOperandsAndResultType]> {
346346
let summary = "Takes `amount` from the start of the tensor in `dimension` and appends it to the end";
347+
let description = [{
348+
Performs a left rotation (circular shift) along `dimension` by `amount` elements.
349+
Elements are shifted left, with the first `amount` elements wrapping around to the end.
350+
351+
i.e.:
352+
```
353+
rotate([a, b, c, d, e], amount=2, dimension=0) → [c, d, e, a, b]
354+
```
355+
}];
347356
let arguments = (ins
348357
HLO_Tensor:$operand,
349358
SI32Attr:$amount,

0 commit comments

Comments
 (0)