Skip to content

Compile bug: ambiguous overload for ‘operator==’ (operand types are ‘vk::DeviceMemory’ and ‘std::nullptr_t’) #15914

@mbaudier

Description

@mbaudier

Git commit

28b5f19

Operating systems

Linux

GGML backends

Vulkan

Problem description & steps to reproduce

I am trying to compile llama.cpp b6435 with Vulkan support on an up-to-date Debian Bookworm (gcc 12) and the build fails with:

llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp: In function ‘vk_buffer ggml_vk_create_buffer(vk_device&, size_t, const std::initializer_list<vk::Flags<vk::MemoryPropertyFlagBits> >&)’:
/home/mbaudier/dev/git/unstable/argeo-jjml/native/tp/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:1963:28: error: ambiguous overload for ‘operator==’ (operand types are ‘vk::DeviceMemory’ and ‘std::nullptr_t’)
 1963 |     if (buf->device_memory == VK_NULL_HANDLE) {
      |                            ^

First Bad Commit

b97c9ed

Compile command

cmake -B build -DGGML_VULKAN=ON -DGGML_CCACHE=OFF

Relevant log output

llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp: In function ‘vk_buffer ggml_vk_create_buffer(vk_device&, size_t, const std::initializer_list<vk::Flags<vk::MemoryPropertyFlagBits> >&)’:
/home/mbaudier/dev/git/unstable/argeo-jjml/native/tp/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:1963:28: error: ambiguous overload for ‘operator==’ (operand types are ‘vk::DeviceMemory’ and ‘std::nullptr_t’)
 1963 |     if (buf->device_memory == VK_NULL_HANDLE) {
      |                            ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions