Skip to main content

Displays PyTorch image tensors in a window on screen

Project description

TorchWindow

TorchWindow is a Python library written mostly in C that enables viewing of PyTorch Cuda Tensors on screen directly from GPU memory (No copying back and forth between GPU and CPU) via Vulkan-Cuda interop.

Build requirements

Currently TorchWindow is only targeting 64-bit platforms. 32-bit may be added in future.

Windows

Visual Studio
CUDA SDK
Vulkan SDK
CMake

Linux

Linux is currently not supported but will be in the next release.

MacOS

MacOS is not supported but may be at some point in the future.

Install from source

In the project root directory:

mkdir build
cd build
cmake ..
cmake --build .
cd ..
pip install .

Install from binaries

pip install torchwindow

Use

To create a window:

from torchwindow import Window
window = Window(640, 480, name="Torch Window")

To display an image tensor in the window

window.draw(image_tensor)

Note that the image tensor must have 3 dimensions, specifically (width, height, channels) in that order. This layout restriction will be relaxed in a future release.

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

TorchWindow-0.1.1-cp39-cp39-win_amd64.whl (578.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

TorchWindow-0.1.1-cp38-cp38-win_amd64.whl (578.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

TorchWindow-0.1.1-cp37-cp37m-win_amd64.whl (578.4 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

Supported by

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