import { c as p, e as s } from "./index-DSGwv2Yx.js";
import "./ops/cpu/rope.js";
import "./ops/webgl/rope.js";
const u = {
  kernelName: "Rope",
  inputsToSave: [],
  outputsToSave: [],
  gradFunc: (e, n, r) => {
    const { ropeCache: o } = r, a = c(e, o, 0, !0);
    return { x: () => a };
  }
};
p(u);
function c(e, n, r, o = !1) {
  return n.ensureRopeCache(e.shape[1] + r), s().runKernel("Rope", { x: e }, {
    pastLen: r,
    negSin: o,
    ropeCache: n
  });
}
export {
  u as a,
  c as r
};
