(&self, data: &[f32])
| 658 | } |
| 659 | |
| 660 | fn upload_uncached(&self, data: &[f32]) -> MappedBuffer { |
| 661 | let bytes = (data.len() * 4) as u64; |
| 662 | let key = BufferPool::bucket(bytes); |
| 663 | let mut alloc_guard = self.allocator.lock().unwrap(); |
| 664 | let alloc = alloc_guard.as_mut().unwrap(); |
| 665 | let buf = Self::alloc_mapped_buffer( |
| 666 | &self.vk_device, |
| 667 | alloc, |
| 668 | key, |
| 669 | vk::BufferUsageFlags::STORAGE_BUFFER, |
| 670 | self.uma_memory_type, |
| 671 | ) |
| 672 | .expect("failed to allocate upload buffer"); |
| 673 | buf.write_f32(data); |
| 674 | buf |
| 675 | } |
| 676 | |
| 677 | // ── Tensor helpers ─────────────────────────────────────────────── |
| 678 |
no test coverage detected