Skip to content

GPU-01 Vulkan context in _ext #9

Closed

Description

@K-T0BIAS

Goal

Process-wide Vulkan init: load loader, create instance/device/compute queue, fail cleanly if unavailable.

Todos

  • Add CMake option CTHREADS_GPU (off by default).
  • Dynamically load vulkan-1 / libvulkan.so.1 (no hard link required for CPU builds).
  • Implement gpu_init() / gpu_shutdown() (lazy or explicit).
  • Pick first compute-capable device (prefer discrete).
  • Expose minimal Python: cthreads.gpu.available() -> bool, cthreads.gpu.device_name() -> str.
  • Raise typed errors: loader missing / no device / init failed.

Notes

  • Interface: no buffers yet; probe-only API.
  • Arch: singleton in _ext; thread-safe call_once init.
  • Impl: Vulkan 1.1+ if easy; don’t require validation layers unless CTHREADS_VK_VALIDATE=1.
  • User dep: GPU drivers only - never Vulkan SDK.

Activity

  1. self-assigned this
    on Sep 5, 2026
  2. added 2 commits that reference this issue on Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

sub-featurePiece of a larger enchancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions