import { a as o, f as d, b as u } from "../../index-DSGwv2Yx.js";
import { l as N } from "../../ops-CURIZSVt.js";
import { o as b } from "../../ones-DbVB5N58.js";
import { z as A } from "../../zeros-Bw0puq_w.js";
import { w as I } from "../../not_equal-CkQKkKZy.js";
import { m as g } from "../../mat_mul-DP86qZtZ.js";
function a(n) {
  const { q: s, k: e } = n.inputs, { divisor: r } = n.attrs, c = s.shape[2], t = e.shape[2], m = N.bandPart(b([t, t]), -1, 0).cast("bool"), i = A([t, t]), l = d([t, t], Number.NEGATIVE_INFINITY), f = I(m, i, l), k = g(s, e, !1, !0).mul(u(r)), p = f.slice([0, 0], [c, t]).expandDims(0).expandDims(0);
  return k.add(p);
}
const w = {
  kernelName: "AttentionMask",
  backendName: "cpu",
  kernelFunc: a
};
o(w);
const M = {
  kernelName: "AttentionMask",
  backendName: "tensorflow",
  kernelFunc: a
};
o(M);
