Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ggml/src/ggml-vulkan/ggml-vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ typedef struct VkPhysicalDeviceCooperativeMatrixDecodeVectorFeaturesNV {

#include "ggml-vulkan-shaders.hpp"

// On 32-bit platforms, Vulkan non-dispatchable handles such as VkBuffer are represented as uint64_t,
// and Vulkan-Hpp disables implicit conversions for type safety.
namespace {
inline std::ostream & operator<<(std::ostream & os, vk::Buffer buffer) {
return os << static_cast<VkBuffer>(buffer);
}
}

// remove this once it's more widely available in the SDK
#if !defined(VK_KHR_shader_bfloat16)

Expand Down Expand Up @@ -8656,7 +8664,7 @@ static bool ggml_vk_buffer_write_2d_async(vk_context subctx, vk_buffer& dst, siz
}

ggml_vk_sync_buffers(nullptr, subctx);
subctx->s->buffer->buf.copyBuffer((VkBuffer)staging_buffer->buffer, (VkBuffer)dst->buffer, slices);
subctx->s->buffer->buf.copyBuffer(staging_buffer->buffer, dst->buffer, slices);

if (width == spitch) {
deferred_memcpy((uint8_t *)staging_buffer->ptr, src, staging_size, &subctx->in_memcpys);
Expand Down
Loading