| 1207 | } |
| 1208 | |
| 1209 | void Window::xprep(std::vector<mtl::Dispatch>& ds, const mtl::Buffer& x, const Act& out, int n) { |
| 1210 | mtl::Dispatch d; |
| 1211 | d.p = P(lib_, "xprep", x16c(), x16k("xprep")); |
| 1212 | const uint32_t nn = n, nt = MAXT; |
| 1213 | d.args = {mtl::Arg::B(x), mtl::Arg::B(out.b), mtl::Arg::V(nn), mtl::Arg::V(nt)}; |
| 1214 | d.tg[0] = 256; |
| 1215 | d.grid[0] = (n / 16 * MAXT + 255) / 256; |
| 1216 | push(ds, d); |
| 1217 | } |
| 1218 | |
| 1219 | // the prepared activation of a dense GEMM group in the rotated domain (rot_): its raw plane FWHT-128 rotated in place, the other planes re-derived |
| 1220 | void Window::act_rot(std::vector<mtl::Dispatch>& ds, const Act& a, int n, int ntok) { |