Skip to main content

VULTORCH

GPU-Native Tensor Visualization for PyTorch

Visualize CUDA tensors at GPU speed — zero CPU readback, zero staging buffers. Neural rendering, reinforcement learning, physics — if it's in a tensor, Vultorch can display it.

License: MIT Python 3.8+ Vulkan

🇨🇳 中文 · 🌐 Website · 📖 Tutorial


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)
  • Not just rendering — RL environments, cellular automata, signal processing — anything tensor-based

Quick Start

pip install vultorch
import torch, vultorch

texture = torch.rand(512, 512, 4, device="cuda")

view = vultorch.View("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

Interactive Training Loop

view = vultorch.View("Training", 1000, 700)
ctrl = view.panel("Controls", side="left", width=0.25)
output = view.panel("Output")
out_canvas = output.canvas("render")

while view.step():
    lr = 10 ** ctrl.slider("log LR", -5.0, -1.0, default=-2.0)
    loss = train_one_step(lr)
    out_canvas.bind(output_tensor)
    view.end_step()

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 Minimal CUDA tensor display
02 imgui_controls Multi-panel layout with ImGui widgets
03 training_test Live network training with GT comparison
04 conway Conway's Game of Life on GPU
05 image_viewer Load, transform & save images
06 pixel_canvas Interactive pixel-level drawing
07 multichannel RGB + depth + normal + alpha viewer
08 gt_vs_pred Training comparison with error heatmap
09 live_tuning Runtime hyperparameter adjustment
10 gaussian2d Differentiable 2D Gaussian splatting
11 3d_inspector Orbit camera with Blinn-Phong lighting
12 neural_workstation Full neural rendering workstation
13 snake_rl DQN learns Snake — RL visualization
python examples/01_hello_tensor.py

Building from Source

Prerequisites

Component Required Notes
GPU ✅ Any Vulkan-capable GPU (NVIDIA, AMD, Intel)
Vulkan SDK ✅ Build lunarg.com/vulkan-sdk — headers + glslangValidator
Vulkan driver ✅ Runtime Ships with your GPU driver
CUDA Toolkit Optional Enables GPU zero-copy in show() / create_tensor()
Python 3.8+ ✅ With development headers (python3-dev on Linux)
CMake 3.25+ ✅ Build

Step 1 — Clone (with submodules)

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

If you forgot --recursive, run: git submodule update --init --recursive

Step 2 — Configure

# Windows (MSVC)
cmake --preset release-windows

# Linux / WSL2 (GCC + Make)
cmake --preset release-linux

Step 3 — Build

cmake --build --preset release-windows    # or release-linux

This executes three targets in order:

  1. _vultorch — Compiles the C++ extension module (.pyd / .so) and SPIR-V shaders.
  2. package_wheel — Runs tools/make_wheel.py to produce a pip-installable .whl in dist/.
  3. docs (optional) — If mkdocs is installed, builds tutorial + API docs into docs/tutorial/.

Step 4 — Install

pip install dist/vultorch-*.whl

Verify:

python -c "import vultorch; print(vultorch.__version__, 'CUDA:', vultorch.HAS_CUDA)"

WSL2 Quick Setup

sudo bash scripts/setup_wsl2.sh

Packaging

Single Wheel

python tools/make_wheel.py

Multi-Version Wheels

python scripts/build_wheels.py            # all defaults (3.8 – 3.12)
python scripts/build_wheels.py 3.10 3.11  # specific versions

Upload to PyPI

python scripts/upload_wheels.py

Testing

pytest                  # all tests
pytest -m "not gpu"     # pure Python only
pytest -m gpu           # GPU tests only
Marker Description
gpu Requires Vulkan-capable GPU with CUDA
slow Long-running tests

Documentation

Tutorial and API reference are built with MkDocs Material + i18n (English + Chinese).

mkdocs build --clean    # build
mkdocs serve            # preview at http://127.0.0.1:8000

Architecture

Vultorch/
├── src/                     # C++ core (Vulkan + CUDA + ImGui)
│   ├── engine.cpp/h         # Vulkan + SDL3 + ImGui engine
│   ├── tensor_texture.*     # CUDA ↔ Vulkan zero-copy interop
│   ├── scene_renderer.*     # 3D renderer (MSAA, Blinn-Phong)
│   ├── bindings.cpp         # pybind11 bindings
│   └── shaders/             # GLSL → SPIR-V
├── vultorch/                # Python package
│   ├── __init__.py          # High-level API
│   ├── app.py               # Declarative API (View, Panel, Canvas)
│   └── *.pyi                # Type stubs
├── examples/                # 13 runnable demos
├── tutorial/                # MkDocs source (EN + ZH)
├── tests/                   # pytest (GPU + non-GPU)
├── external/                # pybind11, SDL3, imgui
├── tools/                   # make_wheel.py, spv_to_header.py
└── scripts/                 # build_wheels.py, upload_wheels.py

License

MIT


Metadata

Release files for vultorch 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vultorch 0.5.1
File
vultorch-0.5.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
vultorch-0.5.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vultorch-0.5.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
vultorch-0.5.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
vultorch-0.5.1-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details

Total release size: 8.4 MB

Release files / vultorch-0.5.1-cp312-cp312-win_amd64.whl

Download URL vultorch-0.5.1-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9044b519af7aee06ae083753a166917909e0900e8430c2c0407ea193f5b85702
BLAKE2b-256 checksum
How to use checksums
022312fe69f96aa22e75b834cfa5bdae68017fa7070ee8d37479f2fa49837191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / vultorch-0.5.1-cp311-cp311-win_amd64.whl

Download URL vultorch-0.5.1-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3d3083dbc3900baa2c953b8d434603ebe92265b525cfc0eefbbcadf5455f7515
BLAKE2b-256 checksum
How to use checksums
573288d37b4c1e459650588869f17196725960eb1637b329bc8b639515da5f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / vultorch-0.5.1-cp310-cp310-win_amd64.whl

Download URL vultorch-0.5.1-cp310-cp310-win_amd64.whl
Size 1.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
dc8fbd94a968cc5f00d29bb710a4b7a1731d47c050ffdcc17490a956c209cce2
BLAKE2b-256 checksum
How to use checksums
6cd00b70e2b7929ec32b5efce57d60bb8e92fcd3a14db508318e8c564a99c73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / vultorch-0.5.1-cp39-cp39-win_amd64.whl

Download URL vultorch-0.5.1-cp39-cp39-win_amd64.whl
Size 1.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
999cd1c79bd575a024f61e70c58e3839b33c77c0588547c2539d575c11f266e4
BLAKE2b-256 checksum
How to use checksums
9360dfb615624d59b93753ad7618731ddc6a726354b467d8abb96512394b3702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / vultorch-0.5.1-cp38-cp38-win_amd64.whl

Download URL vultorch-0.5.1-cp38-cp38-win_amd64.whl
Size 1.7 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
78947214d0c3660e099ed7b31d628b0f30d7bff4b097066cefe3e0dd0c3d83d6
BLAKE2b-256 checksum
How to use checksums
5b775e0a31aa5918e800e0b48c0c866d9b142617cc43a2b029b3a1b9e6676a7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for vultorch 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page