Move ggml_vk_test_single_device_buffer_from_host_ptr call site to other test call location

This commit is contained in:
Simon Redman 2026-02-16 14:56:08 -05:00
parent fe438c6fdd
commit 40f23b341c
No known key found for this signature in database
GPG Key ID: 2B14B66FAEFCDEFE
1 changed files with 8 additions and 4 deletions

View File

@ -12268,6 +12268,14 @@ static void ggml_vk_preallocate_buffers(ggml_backend_vk_context * ctx, vk_contex
}
}
for (size_t device_idx = 0; device_idx < GGML_VK_MAX_DEVICES; device_idx++) {
vk_device device = vk_instance.devices[device_idx];
if (device == nullptr) {
continue;
}
ggml_vk_test_single_device_buffer_from_host_ptr(device);
}
GGML_ABORT("fatal error");
#endif
@ -15128,10 +15136,6 @@ static void ggml_backend_vk_device_event_synchronize(ggml_backend_dev_t dev, ggm
}
static vk_buffer ggml_vk_buffer_from_host_ptr(vk_device & device, void * ptr, size_t size) {
#if defined(GGML_VULKAN_RUN_TESTS)
ggml_vk_test_single_device_buffer_from_host_ptr(vk_instance.devices[idx]);
#endif
if (!device->external_memory_host) {
return {};
}