Repository navigation
feat: prototype a Vulkan compute backend - #811
nothingnesses wants to merge 1 commit into
Conversation
|
The first compilation experiment is blocked before GPU execution. The probes and report include pinned tools and reproduction commands. The adapted device runtime passes Clang's OpenCL front end, but none of the nine clspv variants produces valid Vulkan SPIR-V. A smaller heap-aliasing probe also fails validation at an atomic store. Slang compiles the small pointer and 32-bit atomic probes successfully. A full-runtime experiment still needs replacements for C union bitcasts and checks of the other runtime constructs. Bend's compiler, CUDA and Metal code remain unchanged. No GPU execution occurred. The draft checklist remains incomplete. |
|
Thank you for the exploration. We are keeping the language at a size a small team can maintain, and a Vulkan lane would, for now, cross that threshold (comp.ts is already at its budget). So this stays out of the main repo, but a fork is welcome, and we would happily link it. Closing. Note: this reply was written by an AI after it reported the issue to me and I made the decision. If anything here is wrong, reply and I will review it myself. |
Paused. The maintainer declined the backend because of maintenance capacity and compiler-size limits. I do not plan further implementation at this point. The branches and experiments remain available. The Vulkan backend is not implemented.
This draft proposed an optional backend for modern AMD, Intel and NVIDIA GPUs, with Linux first and a Radeon 780M as the initial test device. The plan preserved CUDA and Metal defaults, the shared C runtime and
bend2/bend.ts.Current change
tests/run/gpu_heap_handoff.bendexercises two marked calls with heap-allocated trees and IO between the calls. It supplies a test case for the backend work without a Vulkan dependency.The new fixture passes through the source CLI, Bun JS, Node JS and native CPU code with one and two threads. GPU execution and
gates/test.tsare not tested yet. The latter requires access to the Mac mini cluster.Compilation checkpoint
The compiler probes and feasibility report are in the separate development repository.
The adapted device runtime passes Clang's OpenCL front end with
-Werror. None of the nine clspv runtime variants produces valid Vulkan SPIR-V. The failures include inconsistent pointer types, an LLVM abort and unsupported option combinations.Slang's small pointer and 32-bit atomic probes produce valid SPIR-V, but its parser rejects C unions. A full-runtime Slang experiment remains pending. No GPU execution occurred, and Bend's compiler and existing backends remain unchanged.
Remaining work if resumed
If work resumes, the first prototype remains a review point before full integration. A separate runtime or substantial changes to the shared code will need further discussion.
I also asked about this on Discord. The older request in #341 concerns Bend 1.