import { c as e, e as u } from "../../index-DSGwv2Yx.js";
function m(r, n, o) {
  return u().runKernel("RMSNormGrad", o ? { dy: r, x: n, gamma: o } : { dy: r, x: n });
}
const c = {
  kernelName: "RMSNorm",
  inputsToSave: ["x", "gamma"],
  outputsToSave: [],
  gradFunc: (r, n) => {
    const [o, a] = n, [t, s] = m(r, o, a);
    return {
      x: () => t,
      gamma: () => s
    };
  }
};
e(c);
const S = {
  kernelName: "RMSNormNoGamma",
  inputsToSave: ["x"],
  outputsToSave: [],
  gradFunc: (r, n) => {
    const [o] = n, [a] = m(r, o);
    return {
      x: () => a
    };
  }
};
e(S);
export {
  c as normRMSGradConfig,
  S as normRMSGradConfigNoGamma
};
