Skip to content

kopffarben/VL.CudaGraph

Repository files navigation

VL.CudaGraph

GPU-accelerated compute pipelines for vvvv gamma via NVIDIA's CUDA Graph API.

Build GPU compute graphs visually in vvvv. Supply kernels as PTX + JSON metadata — authored in Triton, CUDA C++, or any toolchain that outputs PTX. Everything stays on the GPU, no readback unless you ask for it.

What It Does

VL.CudaGraph lets you build GPU compute graphs in vvvv's visual patching environment. Blocks describe GPU work (kernels, buffers, connections), and a single CudaEngine compiles and launches the entire graph each frame using CUDA's native Graph API.

Key properties:

  • Centralized execution — one Engine, one CUDA Graph launch per frame
  • Passive blocks — blocks describe structure, they never touch the GPU directly
  • Three-level dirty tracking — only rebuild what changed (Hot/Warm/Cold)
  • PTX-agnostic — bring kernels from Triton, nvcc, Numba, or hand-written PTX
  • Stride interop — zero-copy sharing with VL.Stride's DX11 renderer

Requirements

  • vvvv gamma 6.x+
  • NVIDIA GPU with Compute Capability 7.5+ (RTX 20xx / Turing or newer)
  • CUDA 12.8 with Driver ≥ 570.x
  • Windows (Linux support depends on VL.Stride availability)

Getting Started

Install as described here via commandline:

nuget install VL.CudaGraph -pre

Usage examples and help patches are included and can be found via the Help Browser.

Kernel Workflow

  1. Write a kernel in your preferred toolchain (Triton, CUDA C++, Numba, ...)
  2. Compile to PTX
  3. Place .ptx + .json metadata files in your project
  4. Use the corresponding block in vvvv — pins are generated from metadata

The runtime consumes PTX + JSON and is agnostic to how the PTX was produced. See docs/architecture/PTX-LOADER.md for details and examples.

Architecture

Any PTX source  →  PTX + JSON  →  VL.CudaGraph  →  CUDA Graph API  →  GPU

PTX sources:  Triton (Python) | CUDA C/C++ (nvcc) | Numba | Hand-written PTX

The system has three main actors:

Component Role
Blocks (passive) Describe kernels, pins, connections — register with CudaContext
CudaContext (facade) Manages block registry, connections, dirty state
CudaEngine (active) Compiles and launches the CUDA Graph each frame

Detailed documentation lives in docs/architecture/. Start with OVERVIEW.md.

Project Structure

VL.CudaGraph/
  docs/
    architecture/          — Design documents (Overview, Execution Model, etc.)
    api/                   — C# API reference
    implementation/        — Roadmap and phase planning
  src/
    VL.Cuda.Core/          — Core library (blocks, engine, compiler, buffers)
    References/            — READ-ONLY git submodules (API reference only)
      VL.StandardLibs/     —   VL.Core, VL.Stride source
      managedCuda/         —   ManagedCuda source

Note: The submodules in src/References/ are for reading API source code only. They are not compiled as part of the solution — our code references ManagedCuda and VL.Core via NuGet.

Status

🚧 Early development — architecture is designed, implementation is in progress. See docs/implementation/PHASES.md for the roadmap.

Contributing

Credits

  • ManagedCuda — .NET bindings for the CUDA Driver API
  • Triton — Python-based kernel language by OpenAI
  • vvvv gamma — visual live-programming environment for .NET

License

TBD

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages