MCPcopy Create free account
hub / github.com/evilsocket/cake / matmul

Method matmul

cake-core/src/backends/vulkan/mod.rs:1382–1392  ·  view source on GitHub ↗
(&self, a: &Tensor, b: &Tensor)

Source from the content-addressed store, hash-verified

1380 }
1381
1382 fn matmul(&self, a: &Tensor, b: &Tensor) -> Result<Tensor> {
1383 let a_dims = a.dims();
1384 let b_dims = b.dims();
1385 let m = a_dims[a_dims.len() - 2];
1386 let k = a_dims[a_dims.len() - 1];
1387 let n = b_dims[b_dims.len() - 1];
1388 // GPU for all sizes. M=1 uses coalesced GEMV. View cache handles weight.t().
1389 // Return F32 always — avoids F32→F16→F32 round-trips between ops.
1390 log::debug!("matmul GPU: M={m} K={k} N={n}");
1391 self.tensor_matmul(a, b)
1392 }
1393
1394 fn rms_norm_gated(
1395 &self,

Callers

nothing calls this directly

Calls 1

tensor_matmulMethod · 0.45

Tested by

no test coverage detected