fn
rotary_pos_embedding_op
→TensorImplPtrint rotary_pos_embedding_op(const int & input, const int & position_ids_or_null, bool interleaved)Apply Rotary Position Embedding to input — free-function entry point.
Thin wrapper that delegates to RotaryPosEmbeddingBackward::forward.
Parameters
inputTensorImplPtrInput of shape with
D even.position_ids_or_nullTensorImplPtrOptional integer position-index tensor of shape
(L,); pass null to use the implicit [0, 1, …, L-1].interleavedboolPair-layout flag (see
RotaryPosEmbeddingBackward).Returns
TensorImplPtrRotated output with the same shape as input.