Metadata-Version: 2.1
Name: cudacanvas
Version: 1.0.0
Summary: Efficiently Render Torch Tensors Directly from CUDA to GPU Without CPU Copy
Home-page: https://github.com/OutofAi/cudacanvas
Author: Ashleigh Watson & Alex Nasa
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/markdown
Requires-Dist: glfw

<a href="https://www.buymeacoffee.com/outofai" target="_blank"><img src="https://img.shields.io/badge/-buy_me_a%C2%A0coffee-orange?logo=buy-me-a-coffee" alt="Buy Me A Coffee"></a>
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Ashleigh%20Watson)](https://twitter.com/OutofAi) 
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40Alex%20Nasa)](https://twitter.com/banterless_ai)

# cudacanvas
CudaCanvas: High Performance real-time PyTorch Tensor Visualisation in CUDA Eliminating CPU Transfer

```python
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


```

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. 

# 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)
```python
import torch
torch.__version__
```
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
```
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

# Support
Also support my channel ☕ ☕ : https://www.buymeacoffee.com/outofai
