import { o as r, n as f, E as e, D as i } from "./index-DSGwv2Yx.js";
function l(s, o = -1) {
  const t = f(s, "logits", "softmax", "float32");
  if (o === -1 && (o = t.rank - 1), o !== t.rank - 1)
    throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${t.rank} and dim was ${o}`);
  const n = { logits: t }, a = { dim: o };
  return e.runKernel(i, n, a);
}
const p = /* @__PURE__ */ r({ softmax_: l });
export {
  p as s
};
