Skip to main content

Real-time Torch visualization window with Vulkan zero-copy

Project description

๐Ÿ”ฅ Vultorch

Real-time Torch Visualization Window ยท Vulkan Zero-Copy

Visualize CUDA tensors at GPU speed โ€” zero CPU readback, zero staging buffers.

License: MIT Python 3.8+ Vulkan

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ ยท ๐ŸŒ Website


Vultorch screenshot

Overview

Vultorch displays CUDA tensors in a native window โ€” data never leaves the GPU. show() performs a fast GPU-GPU copy; create_tensor() eliminates even that via Vulkan shared memory.

vultorch.show(tensor)           # GPU-only, no CPU readback
tensor = vultorch.create_tensor(...)  # true zero-copy, no memcpy at all

Key Features

  • GPU-only display โ€” vultorch.show(tensor) does a fast GPU-GPU copy to Vulkan, no CPU readback ever
  • True zero-copy โ€” vultorch.create_tensor() returns a torch.Tensor backed by Vulkan shared memory โ€” zero memcpy
  • Declarative API โ€” View โ†’ Panel โ†’ Canvas with auto layout and per-frame callback support
  • Built-in ImGui โ€” Sliders, buttons, color pickers, plots, docking layout โ€” all from Python
  • 3D scene view โ€” Map textures onto lit 3D planes with orbit camera, MSAA, Blinn-Phong shading
  • Docking windows โ€” Drag-and-drop window arrangement (ImGui docking branch)

Quick Start

pip install vultorch
import torch, vultorch

# Your neural texture output (or any CUDA tensor)
texture = torch.rand(512, 512, 4, device="cuda")

view = vultorch.View("Neural Texture Viewer", 800, 600)
panel = view.panel("Output")
panel.canvas("main").bind(texture)
view.run()

True Zero-Copy

# Shared GPU memory โ€” writes are instantly visible on screen
tensor = vultorch.create_tensor(512, 512, channels=4)
tensor[:] = model(input)   # write directly, no copy needed

3D Scene

scene = vultorch.SceneView("3D", 800, 600, msaa=4)
scene.set_tensor(texture)
scene.render()  # orbit camera, Blinn-Phong lighting

Examples

Example Description
01_hello_tensor.py Minimal tensor display
02_imgui_controls.py Multi-panel layout with docking
03_training_test.py Tiny network live training (GT vs prediction + bottom info panel)
python examples/01_hello_tensor.py

Building from Source

Prerequisites

Component Required Notes
GPU โœ… Any Vulkan-capable GPU (NVIDIA, AMD, Intel)
Vulkan Runtime Ships with your GPU driver โ€” no separate install needed
Vulkan SDK Build only lunarg.com/vulkan-sdk โ€” only for building from source
CUDA Toolkit Optional For show() and create_tensor()
Python 3.8+ โœ…
CMake 3.25+ Build only + Ninja

Clone & Build

git clone --recursive https://github.com/ChenlizheMe/Vultorch.git
cd Vultorch

One command โ€” configure, compile, and produce a wheel in dist/:

# Windows
build.bat

# Linux
./build.sh

The wheel appears in dist/. Install it:

pip install dist/vultorch-*.whl

The build script auto-detects the active Python environment, so the wheel matches whichever python is on your PATH (conda, venv, system, etc.).

Architecture

vultorch/
โ”œโ”€โ”€ src/                    # C++ core
โ”‚   โ”œโ”€โ”€ engine.cpp/h        # Vulkan + SDL3 + ImGui engine
โ”‚   โ”œโ”€โ”€ tensor_texture.*    # CUDA โ†” Vulkan zero-copy interop
โ”‚   โ”œโ”€โ”€ scene_renderer.*    # Offscreen 3D renderer (MSAA, Blinn-Phong)
โ”‚   โ”œโ”€โ”€ bindings.cpp        # pybind11 Python bindings
โ”‚   โ””โ”€โ”€ shaders/            # GLSL shaders โ†’ SPIR-V
โ”œโ”€โ”€ vultorch/               # Python package
โ”‚   โ””โ”€โ”€ __init__.py         # High-level API (Window, show, SceneView)
โ”œโ”€โ”€ external/               # Git submodules
โ”‚   โ”œโ”€โ”€ pybind11/           # C++ โ†” Python binding
โ”‚   โ”œโ”€โ”€ SDL/                # Window / input (SDL3)
โ”‚   โ””โ”€โ”€ imgui/              # Dear ImGui (docking branch)
โ”œโ”€โ”€ examples/               # Ready-to-run demos
โ”œโ”€โ”€ tools/                  # Build utilities
โ””โ”€โ”€ docs/                   # GitHub Pages website

License

MIT


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vultorch-0.3.5-cp312-cp312-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.12Windows x86-64

vultorch-0.3.5-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11Windows x86-64

vultorch-0.3.5-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10Windows x86-64

vultorch-0.3.5-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9Windows x86-64

vultorch-0.3.5-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file vultorch-0.3.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: vultorch-0.3.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vultorch-0.3.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 292e3612111d4ba9b69fabee6601fe410edc645bbb66817e514f369dabc301ea
MD5 5a586f199b612fd8e30f62e2e931b20d
BLAKE2b-256 6c4870a6aee2de1937f12e67c68d3941ac9fd6eac658579cc2b7c2fb6437317d

See more details on using hashes here.

File details

Details for the file vultorch-0.3.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vultorch-0.3.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vultorch-0.3.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 07647cc6630cbfca20fdc7f773bfd74f0ba7ed44b8736cdc8ac261dc16305c29
MD5 6e45cf4698e71547a5d4b682dca50762
BLAKE2b-256 c29997a1a5fb8062263e84bb1bf5f29840970c75da09dc552f15f85070b8a5cf

See more details on using hashes here.

File details

Details for the file vultorch-0.3.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: vultorch-0.3.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vultorch-0.3.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f3960b7a2645ff3a1189671515523d41c874d016fa9cb666a2d268824a7c7084
MD5 277b2595615a116816e8d20ae524be45
BLAKE2b-256 8422ec6ea1e7424266812c8de7b83da4688eb512850ada4c0a5a81c9e203b99b

See more details on using hashes here.

File details

Details for the file vultorch-0.3.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: vultorch-0.3.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vultorch-0.3.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 414e1d2c4d7279c8b938c9fdd5639e5ec22e2d02cf4464e39516f313d7d72458
MD5 cf07e72890b477ceaf8adac958b30b91
BLAKE2b-256 18e1509cdb4b64765a489cc8118227208c688bad68fdfb1a47d84b5d8c9b191e

See more details on using hashes here.

File details

Details for the file vultorch-0.3.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: vultorch-0.3.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vultorch-0.3.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d6aca06cceb3f37800317fb67aab9cda362d6903e2d64f79027ec0b7c2fa2450
MD5 604e9637f956aa2297917d8f81f30c15
BLAKE2b-256 24e885e3072f9cbaa8436b0511136485b209726fe0066be993e1707238530b46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page