Skip to content

feat: Vulkan-CUDA interop — zero-copy GPU memory sharing#10

Merged
Cle2ment merged 7 commits into
masterfrom
feat/vulkan-cuda-interop
Jun 4, 2026
Merged

feat: Vulkan-CUDA interop — zero-copy GPU memory sharing#10
Cle2ment merged 7 commits into
masterfrom
feat/vulkan-cuda-interop

Conversation

@Cle2ment
Copy link
Copy Markdown
Owner

@Cle2ment Cle2ment commented Jun 4, 2026

Summary

Replace the CUDA→CPU→Vulkan data roundtrip with direct GPU memory sharing via Vulkan external memory and CUDA external resource APIs.

Before

CUDA kernel → cudaMemcpy D2H (PCIe) → CPU buffer → SetData (CPU copy) → vkCmdCopyBufferToImage → display

After (interop enabled)

CUDA kernel → shared GPU buffer → vkCmdCopyBufferToImage → display

Changes (6 commits)

  • 33da5c3: Add Vulkan external memory extensions + GetQueue/GetImage accessors to Walnut
  • 6ce0a4c: VkCUDAInterop RAII wrapper (Vulkan buffer export → CUDA import)
  • fc24c6b: CUDA renderer interop output buffer support
  • 2f5cc2f: Pipeline integration + ImGui toggle
  • f666aa3: Fix critical issues (cudaFree on external mem, missing barriers, WL_CUDA guards)
  • 677bc21: Point Walnut submodule to Cle2ment/Walnut fork

Key design

  • Windows-only (OPAQUE_WIN32 handle type)
  • Non-interop D2H path preserved as fallback
  • ImGui checkbox in Settings panel to toggle
  • Automatic fallback on interop failure
  • Build verified, Oracle-reviewed, user-tested ✅

@Cle2ment Cle2ment merged commit f314d5c into master Jun 4, 2026
2 checks passed
@Cle2ment Cle2ment deleted the feat/vulkan-cuda-interop branch June 5, 2026 02:31
@Cle2ment Cle2ment restored the feat/vulkan-cuda-interop branch June 5, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant