import { c as n, e as a } from "../../index-DSGwv2Yx.js";
import { isPackedTensor as t } from "../../utilities/packed.js";
function s(r, e) {
  return a().runKernel("Softmax16Grad", { dy: r, softmaxOutput: e });
}
const i = {
  kernelName: "Softmax16",
  outputsToSave: [!0],
  gradFunc: (r, e) => {
    const [o] = e;
    if (Array.isArray(r))
      throw new Error("Expected dy to be a single Tensor");
    if (!t(o))
      throw console.error(o), new Error("Softmax16 gradient requires packed y Tensor");
    if (!t(r))
      throw new Error("Softmax16 gradient requires packed dy Tensor");
    return {
      logits: () => s(r, o)
    };
  }
};
n(i);
export {
  i as softmax16GradConfig
};
