import { c as p, a as s, e as c } from "../index-DSGwv2Yx.js";
import { r as u } from "../reshape-BIN71H3p.js";
const i = {
  kernelName: "Reshape16",
  inputsToSave: ["x"],
  gradFunc: (e, r) => {
    const [n] = r;
    if (Array.isArray(e))
      throw new Error("Reshape16 gradient does not support multiple outputs.");
    return { x: () => m(e, n.shape) };
  }
};
p(i);
function a(e) {
  const { inputs: r, attrs: n } = e, { x: t } = r, { shape: o } = n;
  return u(t, o);
}
const l = {
  kernelName: "Reshape16",
  backendName: "webgpu",
  kernelFunc: a
};
s(l);
const g = {
  kernelName: "Reshape16",
  backendName: "webgl",
  kernelFunc: a
};
s(g);
const h = {
  kernelName: "Reshape16",
  backendName: "cpu",
  kernelFunc: a
};
s(h);
function m(e, r) {
  return c().runKernel("Reshape16", { x: e }, { shape: r });
}
export {
  m as reshape16
};
