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

Method exp_mul

cake-core/src/backends/vulkan/mod.rs:1323–1332  ·  view source on GitHub ↗
(&self, x: &Tensor, y: &Tensor)

Source from the content-addressed store, hash-verified

1321 }
1322
1323 fn exp_mul(&self, x: &Tensor, y: &Tensor) -> Result<Tensor> {
1324 let n = x.elem_count();
1325 if n > 32768 {
1326 log::debug!("exp_mul GPU: {n} elements");
1327 self.dispatch_binary_vec4(x, y, "exp_mul")
1328 } else {
1329 log::debug!("exp_mul CPU: {n} elements (<=32768)");
1330 (x * y.exp()?)?.contiguous()
1331 }
1332 }
1333
1334 fn sub_mul(&self, a: &Tensor, b: &Tensor, c: &Tensor) -> Result<Tensor> {
1335 let n = a.elem_count();

Callers

nothing calls this directly

Calls 1

dispatch_binary_vec4Method · 0.80

Tested by

no test coverage detected