Skip to main content

Display tensors directly from GPU

Project description

TorchWindow

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

Install

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)

image must be a tensor with the following properties:

  • 3 dimensions, specifically (rows, columns, channels) in that order.
  • channels dimension must be of size 4 (r, g, b, a)

Example

To check if torchwindow is properly installed try running

python3 -m torchwindow.example

You should see this window appear for 5 seconds before closing Example

Project details


Download files

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

Source Distribution

torchwindow-1.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

torchwindow-1.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file torchwindow-1.1.0.tar.gz.

File metadata

  • Download URL: torchwindow-1.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.15+ Linux/5.15.0-52-generic

File hashes

Hashes for torchwindow-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4f19f4299a1241cc94cb30c3dec7773cec29c8e54f2538aee22ffc897630f5fc
MD5 a30ec79dbf19e47054c66c28d71b4b27
BLAKE2b-256 7562b90ae15b25b48d271cd0b48053cd53994733fca1ba3c079a380a00cd6ec2

See more details on using hashes here.

File details

Details for the file torchwindow-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: torchwindow-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.15+ Linux/5.15.0-52-generic

File hashes

Hashes for torchwindow-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8554a2a9ffa0c6b2601d8dfb3c04b3deb0269abaaba0c3036ab1c32a541d5b
MD5 97a3f05e54490ae7ebca5f84364dd909
BLAKE2b-256 8ccb85329967281307852ccd3fe65d9fab3f4f828d956a632dde6c17f747943a

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