(&self, a: &Tensor, b: &Tensor, c: &Tensor)
| 1332 | } |
| 1333 | |
| 1334 | fn sub_mul(&self, a: &Tensor, b: &Tensor, c: &Tensor) -> Result<Tensor> { |
| 1335 | let n = a.elem_count(); |
| 1336 | if n > 32768 { |
| 1337 | log::debug!("sub_mul GPU: {n} elements"); |
| 1338 | self.dispatch_ternary_vec4(a, b, c, "sub_mul") |
| 1339 | } else { |
| 1340 | log::debug!("sub_mul CPU: {n} elements (<=32768)"); |
| 1341 | ((a - b)? * c)?.contiguous() |
| 1342 | } |
| 1343 | } |
| 1344 | |
| 1345 | fn preprocess_linear_weight(&self, weight: &Tensor) -> Result<Tensor> { |
| 1346 | // Pre-upload F32 version to GPU cache (tensor_matmul will find it via get_or_upload). |
nothing calls this directly
no test coverage detected