0

Are there any recommended or minimum system requirements for Microsoft Cognitive Network Toolkit? I cannot find this information anywhere on the git.

cho
  • 1
  • 2

3 Answers3

1

You can find some references to requirements for GPU hardware here:

https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows

I tested some of the simple image recognition tutorials on an older desktop machine with a GPU with too low score (so only using the CPU) and it took more than an hour to complete the training. On a Surface Book (1. generation) it took a few minutes. The first-generation Surface Book uses what AnandTech said was approximately equivalent to a GeForce GT 940M. I have not tested on a desktop machine with some of the newer high end GPU cards to see how they perform, but it would be interesting to know.

I performed a little testing using this tutorial: https://github.com/Microsoft/CNTK/blob/master/Tutorials/CNTK_201B_CIFAR-10_ImageHandsOn.ipynb

On my Surface Book (1. generation) I get the following results for the 1. part of the training:

Finished Epoch [1]: [Training] loss = 2.063133 * 50000, metric = 75.6% * 50000 16.486s (3032.8 samples per second)
Finished Epoch [2]: [Training] loss = 1.677638 * 50000, metric = 61.5% * 50000 16.717s (2990.9 samples per second)
Finished Epoch [3]: [Training] loss = 1.524161 * 50000, metric = 55.4% * 50000 16.758s (2983.7 samples per second)

These are the results from running on an C6 Azure VM with one Nvidia K80 GPU:

Finished Epoch [1]: [Training] loss = 2.061817 * 50000, metric = 75.5% * 50000 9.766s (5120.0 samples per second)
Finished Epoch [2]: [Training] loss = 1.679222 * 50000, metric = 61.5% * 50000 10.312s (4848.5 samples per second)
Finished Epoch [3]: [Training] loss = 1.524643 * 50000, metric = 55.6% * 50000 8.375s (5970.1 samples per second)

As you can see, the Azure VM is about 2x faster than my Surface Book, so if you need to experiment and you don't have a machine with a powerful GPU, Azure could be an option. The K80 GPU also have a lot more memory onboard, so it can run models with higher memory requirements. The VM in Azure can be started only when needed to save cost.

On my Surface Book, I will easily get memory errors like this:

RuntimeError: CUDA failure 2: out of memory ; GPU=0 ; hostname=OLAVT01 ; expr=cudaMalloc((void**) &deviceBufferPtr, sizeof(AllocatedElemType) * numElements)

This is due to the fact that the Surface Book (1. generation) only have 1GB GPU memory.

Update: When I first ran the tests the code was running on CPU. The results above are all from using the GPU.

To check if you are running on the CPU or the GPU use the following code:

import cntk as C
if C.device.default().type() == 0:
    print('running on CPU')
else:
    print('running on GPU')

To ask CNTK to use the GPU use:

from cntk.device import set_default_device, gpu
set_default_device(gpu(0))
OlavT
  • 2,496
  • 4
  • 31
  • 56
  • Does anyone have a Nvidia GTX 1080 to test with? It would be great to see the numbers for that kind of GPU! – OlavT Jan 11 '17 at 18:16
1

GPU requirement is CUDA enabled card with compute capability 3.0 or higher. I've tried to run training on PC with GPU GeForce GT 610 and got this message:

The GPU (GeForce GT 610) has compute capability 2.1. CNTK is only supported on GPUs with compute capability 3.0 or greater

MarkoR
  • 543
  • 4
  • 12
0

CNTK itself has minimal requirements. However training some of the bigger more demanding models can be slow so having a GPU (or 8) can help.