import { s as u, a0 as A, e as y } from "../index-DSGwv2Yx.js";
import { a as h } from "../ops-CURIZSVt.js";
import { t as p } from "../tensor1d-BMl0eZYV.js";
import { t as r } from "../tensor-D8e0Gd7c.js";
const w = Array.from({ length: 2048 * 192 }, () => Math.random()), x = Array.from({ length: 192 }, () => Math.random()), M = Array.from({ length: 2048 * 192 }, () => Math.random());
async function k(t) {
  await u(t);
  const o = p(x, "float32"), n = r(w, [16, 128, 192], "float32"), s = r(M, [16, 128, 192], "float32"), e = (d, g) => {
    const i = y().runKernel("RMSNorm", { x: d, gamma: g });
    return h.meanSquaredError(i, s);
  }, { value: m, grads: a } = A(e)([n, o]), c = await m.array(), f = await a[0].array(), l = await a[1].array();
  return [c, f, l];
}
export {
  k as execute
};
