[Vulkan][32-bit] non-dispatchable handles do not fit in void* on i586
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mudler/vllm.cpp のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
mudler/vllm.cpp の issue をすべて見る
似ている issue
-
`enzymexla.linalg.lu` lowering fails for a tall matrix: the permutation is built with the pivot typeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EnzymeAD/Enzyme-JAX#3286 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
apache/iceberg-cpp#973 ·
メンテナーはふだん 1 日以内に返信
-
feature request
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信