Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Vulkan][32-bit] non-dispatchable handles do not fit in void* on i586

Đang mở
#3,182 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu trong src/vt/vulkan/vulkan_context.cpp bằng cách lần theo các static assertion của VkBuffer và VkDeviceMemory, sau đó kiểm tra các đường dẫn Pack/Unpack và các trường context public của backend lưu các handle này. Build v0.0.2 với -DVLLM_CPP_VULKAN=ON trên i586; hoàn thành khi backend Vulkan biên dịch mà không chuyển các handle không thể dispatch qua void*.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The Vulkan backend does not compile on 32-bit x86/i586. In src/vt/vulkan/vulkan_context.cpp, it asserts that Vulkan handles fit in void*:

static_assert(sizeof(VkBuffer) <= sizeof(void*), "VkBuffer must fit in void*");
static_assert(sizeof(VkDeviceMemory) <= sizeof(void*), "VkDeviceMemory must fit in void*");

With the Vulkan headers on i586, the assertions fail because the comparison is 8 <= 4. Vulkan non-dispatchable handles such as VkBuffer and VkDeviceMemory are 64-bit values even when the host pointer size is 32-bit.

The backend then packs these handles through void* in Pack/Unpack, and the public backend context stores buffer and memory handles as void*, so simply removing the assertions would not be sufficient.

Reproducer

Build v0.0.2 on i586 with:

-DVLLM_CPP_VULKAN=ON

The build fails in src/vt/vulkan/vulkan_context.cpp with:

error: static assertion failed: VkBuffer must fit in void*
the comparison reduces to (8 <= 4)
error: static assertion failed: VkDeviceMemory must fit in void*
the comparison reduces to (8 <= 4)

Proposed direction

Use an architecture-independent opaque handle representation, such as a dedicated 64-bit storage type for non-dispatchable handles, and avoid packing them into void*. Dispatchable pointer handles can remain pointer-sized.

The openSUSE package currently disables the Vulkan backend on 32-bit x86 as a downstream workaround.

Ngôn ngữ chính
C++
Star
423
Fork
53
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
376

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mudler/vllm.cpp

Tất cả issue của mudler/vllm.cpp

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.