18

I see many torch codes use:

require cudnn
require cunn
require cutorch

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

nbro
  • 15,395
  • 32
  • 113
  • 196
hunter
  • 529
  • 2
  • 6
  • 16

3 Answers3

14

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.

SeanNaren
  • 164
  • 1
  • 2
2

Not sure what 'cutorch' is but from my understanding:

Cuda: Library to use GPUs.

cudnn: Library to do Neural Net stuff on GPUs (probably uses Cuda to talk to the GPUs)

source: https://www.quora.com/What-is-CUDA-and-cuDNN

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
-1

Cuda is a parallel computing platform and programming model developed by NVIDIA for general computing on graphical processing units (GPUs). With CUDA, developers are able to dramatically speed up computing applications by harnessing the power of GPUs.

And cuDNN is a Cuda Deep neural network library which is accelerated on GPU's. It's built on underlying Cuda framework.

Tanveer
  • 890
  • 12
  • 22