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.
๐จ๐ณ ไธญๆ ยท ๐ Website
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 โ Canvaswith 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
Examples ยท Website ยท ไธญๆๆๆกฃ
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
292e3612111d4ba9b69fabee6601fe410edc645bbb66817e514f369dabc301ea
|
|
| MD5 |
5a586f199b612fd8e30f62e2e931b20d
|
|
| BLAKE2b-256 |
6c4870a6aee2de1937f12e67c68d3941ac9fd6eac658579cc2b7c2fb6437317d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07647cc6630cbfca20fdc7f773bfd74f0ba7ed44b8736cdc8ac261dc16305c29
|
|
| MD5 |
6e45cf4698e71547a5d4b682dca50762
|
|
| BLAKE2b-256 |
c29997a1a5fb8062263e84bb1bf5f29840970c75da09dc552f15f85070b8a5cf
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3960b7a2645ff3a1189671515523d41c874d016fa9cb666a2d268824a7c7084
|
|
| MD5 |
277b2595615a116816e8d20ae524be45
|
|
| BLAKE2b-256 |
8422ec6ea1e7424266812c8de7b83da4688eb512850ada4c0a5a81c9e203b99b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
414e1d2c4d7279c8b938c9fdd5639e5ec22e2d02cf4464e39516f313d7d72458
|
|
| MD5 |
cf07e72890b477ceaf8adac958b30b91
|
|
| BLAKE2b-256 |
18e1509cdb4b64765a489cc8118227208c688bad68fdfb1a47d84b5d8c9b191e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6aca06cceb3f37800317fb67aab9cda362d6903e2d64f79027ec0b7c2fa2450
|
|
| MD5 |
604e9637f956aa2297917d8f81f30c15
|
|
| BLAKE2b-256 |
24e885e3072f9cbaa8436b0511136485b209726fe0066be993e1707238530b46
|