Real-time PyTorch Tensor Visualisation in CUDA, Eliminating CPU Transfer
Project description
cudacanvas
CudaCanvas: Real-time PyTorch Tensor Visualisation in CUDA, Eliminating CPU Transfer
CudaCanvas is a simple Python module that eliminates CPU transfer for Pytorch tensors for displaying and rendering images in the training or evaluation phase, ideal for machine learning scientists and engineers.
import torch
import cudacanvas
noise_image = torch.rand((4, 500, 500), device="cuda")
cudacanvas.set_image(noise_image)
cudacanvas.create_window()
#replace this with you training loop
while (True):
cudacanvas.render()
if cudacanvas.should_close():
#end process if the window is closed
break
Installation
Before instllation make sure you have torch with cuda support already installed on your machine
Identify your current torch and cuda version, cudacanvas currently only supports torch 2.1.2 and cuda (11.8 or 12.1)
import torch
torch.__version__
CUDA 12.1
If you are running torch 2.1.2 with Cuda 12.1 (2.1.2+cu121) you can download it straight from pypi by running
pip install cudacanvas
CUDA 11.8
If you are running torch 2.1.2 with Cuda 11.8 (2.1.2+cu118) you can run this script
pip install cudacanvas --find-links https://github.com/OutofAi/cudacanvas/wiki/cu118
or manaully download the latest wheel releases from https://github.com/OutofAi/cudacanvas/releases/
Support
Also support my channel ☕ ☕ : https://www.buymeacoffee.com/outofai
Project details
Release history Release notifications | RSS feed
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
Hashes for cudacanvas-1.0.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ae935841a220c36649bfbcd8725e803da5724dd4e26194759d1a48d82b3d668 |
|
MD5 | 7e801f511b4d053ca252ed06f74e6cf3 |
|
BLAKE2b-256 | 6e9daf742f9c1b3a9ce20a967a1aeba029c69d524f1500341708805696be8f6d |
Hashes for cudacanvas-1.0.1-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db6793ce15ecb919894b0fac4e820ddeb2676a903a34d73903a1b13a115d5ee5 |
|
MD5 | a3b02ece2e43cba3c1ae835884b88cd3 |
|
BLAKE2b-256 | a392faf6447bfc23724052c0f69f0e7c7e4502b138f303f9d070e7eae1dabcbc |
Hashes for cudacanvas-1.0.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4eb8c3e9f33b8686ac14aea5fe5a0aef8395858261cfb4dfb33dee84369011 |
|
MD5 | aca9dba537658b85f2507f42fb292892 |
|
BLAKE2b-256 | f679551ab94d18f852024ff83379b3f906942645a607c2d0822d04cdef5aa120 |
Hashes for cudacanvas-1.0.1-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4caef0dc60c02a35d265c93b5ef47870f37a2da80a51d192264b720b443248 |
|
MD5 | 8f72346fc09555655f3bd7a9cc690c04 |
|
BLAKE2b-256 | 1654399f2e2fe7d987090cd2ceac8a872ca53ab11640f0cfa6c09039325a2510 |
Hashes for cudacanvas-1.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8a6aa759209cc5cdc635cd2d66a658f1a219aad3128c738362791165de778a3 |
|
MD5 | a51a4e4f69ae2898408315b5441286ec |
|
BLAKE2b-256 | 2c4e218276576f0d2d80ddc575dddbf6caf4a7f2a9b8ce1ceccacd71d70aaa8d |
Hashes for cudacanvas-1.0.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8606217899e9e40b00018bc600e33f8d1ee78d202b3a59c327fa6dd5645006b0 |
|
MD5 | ccd33fc250992d76a8537d4416047a2f |
|
BLAKE2b-256 | 710e25a3430b611cb15cdcba9b198bdcba0f4fcb223d1a9053215963bd6bec5a |