Skip to content

CUDA

PyTorch / datasets / dataloader / data transfer to GPU – III – prepared tensor datasets and preloading to GPU

In this post series we have a look at PyTorch dataloaders and Torchvision image datasets (downloaded via PyTorch modules). PyTorch DataLoaders retrieve batches of dataset elements and transfer them to neural networks [NN] on a computation device – e.g. a CUDA driven graphics card. A central dataset functions applies defined transformation operations to its elements. We analyze the impact of… Read More »PyTorch / datasets / dataloader / data transfer to GPU – III – prepared tensor datasets and preloading to GPU

Runtime vs.number of dataloader workers and batch size

PyTorch / datasets / dataloader / data transfer to GPU – II – dataloader too slow on CPU?

Editorial hint: This post has been revised and changed in parts on March, 18th/19th/22nd, 2025, after some new tests and insights. The changes did not concern the result data of the performed experiments, but their interpretation. In the last post of this mini-series we saw that some Torchvision datasets have a directly accessible property “data“. It contains image data in… Read More »PyTorch / datasets / dataloader / data transfer to GPU – II – dataloader too slow on CPU?

Two CUDA/cudnn versions with Pytorch and Tensorflow in one virtual Python environment

One of the problems I recently ran into was the coexistence of Tensorflow2 [TF2] and PyTorch in the very same virtual Python environment. I just wanted to make experiments to compare the performance of some Keras-based models with the TF2-backend on one side and, on the other side, with the PyTorch-backend. My trouble resulted from a mismatch of two CUDA/cudnn… Read More »Two CUDA/cudnn versions with Pytorch and Tensorflow in one virtual Python environment

Setting NUMA node to 0 for Nvidia cards on standard Linux PCs

People working on Linux PCs with Tensorflow 2 [TF2] and CUDA may be confronted with warnings complaining a lack of an assignment of their Nvidia graphics card to a NUMA node. This is somewhat enervating as depending on the TF2 version a default entry of “-1” for the NUMA on consumer systems may clatter some of your Jupyter notebook cells… Read More »Setting NUMA node to 0 for Nvidia cards on standard Linux PCs