Efficiently Render Torch Tensors Directly from CUDA to GPU Without CPU Copy
Project description
cudacanvas
CudaCanvas: High Performance real-time PyTorch Tensor Visualisation in CUDA Eliminating CPU Transfer
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)
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
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.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f416dbc6c018790f64909a720a4ca9b51bf5eb8575d36aacab414c98d4590681 |
|
MD5 | 316901cb3e0264b0c4e7366da7364a9e |
|
BLAKE2b-256 | df2e644f954f78d63aad39ff743d0fb9339475ec60b8a4ad2d790901c5152b53 |
Hashes for cudacanvas-1.0.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16ca5b6751a9835994bf135e12a15eb979674f4da415defcf0ea22e95f7ad6b6 |
|
MD5 | eb271f1839f2c6500ec1447bbc20fe13 |
|
BLAKE2b-256 | ffb21122b599408a061584b5568ca3e8db4653a78a85bee6b5e95e799fc26a4d |
Hashes for cudacanvas-1.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca8d77b110bae130d8b0b1a16f25f77e9aa1bec43ab6c574441f81857d3ca55b |
|
MD5 | 3a9772ff6883a2b1349c58f329d5a193 |
|
BLAKE2b-256 | 1f979b45e509587f5ab1d8b01a8eceda17fda4031889915355aed67a4ffca6ad |
Hashes for cudacanvas-1.0.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7df69f64b607365cef08231f49d49d0f1ddee1b5ffb3b5fe0dcfe4c12b7200 |
|
MD5 | b1fbbfef73024adb2696e108a0802601 |
|
BLAKE2b-256 | 4724c3f05ba11aeaf7114cf4597a4e99e2c6a1f066f88d345e235e928f106810 |
Hashes for cudacanvas-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0420fb8add37aeca30eb34c9498b3a14347c9879ed0cba28464272144281ce5d |
|
MD5 | d090a3b37298f718015c73aff7158685 |
|
BLAKE2b-256 | e709b1366f045038b6a04fd8115c0efd7d24c1f38b3c5ff59d920455d16c155c |
Hashes for cudacanvas-1.0.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b5940afb6b134becc0c668aafdcfbc6ff199821bc7dc028368e9bb00182484e |
|
MD5 | c6d99ffe97405fd3bf337f982fa08c43 |
|
BLAKE2b-256 | 07c52a95e1f5143a8256f11888a75465e5fa46d8076f39d824fb2f507e4a2b71 |