Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#3,182 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
backend

調査の方向性

src/vt/vulkan/vulkan_context.cpp で VkBuffer と VkDeviceMemory の static assertion を追跡するところから始め、次に Pack/Unpack パスと、これらのハンドルを格納する public backend context フィールドを調べます。i586 上で -DVLLM_CPP_VULKAN=ON を指定して v0.0.2 をビルドします。完了条件は、non-dispatchable ハンドルを void* 経由で渡すことなく Vulkan backend がコンパイルできることです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C++
スター
423
フォーク
53
平均マージ
1日 5時間
マージ済み PR(30日)
376

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mudler/vllm.cpp のほかの issue

mudler/vllm.cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。