(shape: &[usize])
| 19 | // ============================================================================ |
| 20 | |
| 21 | fn make_f16_tensor(shape: &[usize]) -> Tensor { |
| 22 | let n: usize = shape.iter().product(); |
| 23 | let data: Vec<f32> = (0..n).map(|i| i as f32 * 0.01).collect(); |
| 24 | Tensor::from_vec(data, shape, &Device::Cpu) |
| 25 | .unwrap() |
| 26 | .to_dtype(DType::F16) |
| 27 | .unwrap() |
| 28 | } |
| 29 | |
| 30 | fn mock_worker_info(latency: u128) -> WorkerInfo { |
| 31 | WorkerInfo { |
no outgoing calls
no test coverage detected