diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index 6696f122f..7a00cecf2 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -3135,7 +3135,9 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const std vk::MemoryHostPointerPropertiesEXT host_pointer_props; try { host_pointer_props = device->device.getMemoryHostPointerPropertiesEXT(vk::ExternalMemoryHandleTypeFlagBits::eHostAllocationEXT, import_ptr); + fprintf(stderr, "PROBE import ptr=%p size=%zu memTypeBits=0x%x reqMemTypeBits=0x%x\n", import_ptr, size, host_pointer_props.memoryTypeBits, mem_req.memoryTypeBits); } catch (vk::SystemError& e) { + fprintf(stderr, "PROBE import getMemoryHostPointerPropertiesEXT threw: %s\n", e.what()); GGML_LOG_WARN("ggml_vulkan: Failed getMemoryHostPointerPropertiesEXT (%s)\n", e.what()); device->device.destroyBuffer(buf->buffer); return {}; @@ -3160,6 +3162,7 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const std } } if (memory_type_idx == 32) { + fprintf(stderr, "PROBE import no memory type matched (wanted visible+coherent+cached)\n"); GGML_LOG_WARN("ggml_vulkan: Memory type for host allocation not found\n"); device->device.destroyBuffer(buf->buffer); return {}; @@ -3173,6 +3176,7 @@ static vk_buffer ggml_vk_create_buffer(vk_device& device, size_t size, const std import_info.setPNext(&mem_flags_info); buf->device_memory = device->device.allocateMemory({ size, memory_type_idx, &import_info }); } catch (const vk::SystemError& e) { + fprintf(stderr, "PROBE import allocateMemory threw: %s\n", e.what()); GGML_LOG_WARN("ggml_vulkan: host pointer memory import failed (%s)\n", e.what()); } } else {