Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference and relation among 'cuda' 'cudnn' 'cunn' and 'cutorch' in torch?

Tags:

cuda

torch

cudnn

I see many torch codes use:

require cudnn
require cunn
require cutorch

What are these package used for? What is their relation with Cuda?

like image 372
hunter Avatar asked Jul 05 '16 03:07

hunter


1 Answers

All 3 are used for CUDA GPU implementations for torch7.

cutorch is the cuda backend for torch7, offering various support for CUDA implementations in torch, such as a CudaTensor for tensors in GPU memory. Also adds some helpful features when interacting with the GPU.

cunn provides additional modules over the nn library, mainly converting those nn modules to GPU CUDA versions transparently. This makes it easy to switch neural networks to the GPU and vice versa via cuda!

cuDNN is a wrapper of NVIDIA's cuDNN library, which is an optimized library for CUDA containing various fast GPU implementations, such as for convolutional networks and RNN modules.

like image 183
SeanNaren Avatar answered Nov 24 '22 08:11

SeanNaren