4
$\begingroup$

I have a NetTrain call with the following parameters:

tNet = NetTrain[inVecs -> outVecs, TargetDevice -> "GPU"];

But for some reason, the training is still occurring on the CPU rather than the GPU. I also tried TargetDevice -> {"GPU", 1}, matching the GPU number of the NVIDIA card on my computer. But that did not help either.

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Can you use CUDA? What is the result of << CUDALink`; CUDAQ[] For me, training on GPU works and I see a clear difference in CPU usage. $\endgroup$ – halirutan Oct 22 '18 at 8:05
  • $\begingroup$ @halirutan sorry for the long delay. The output of CUDAQ[] is True. And the output of CUDADriverVersion[] is 416.3, which is the latest driver for the NVIDIA Quadro M1000M chip. $\endgroup$ – Shredderroy Oct 22 '18 at 17:08
0
$\begingroup$

The windows resource monitor can be deceptive. Click the GPU you want to monitor, and change the graph to compute 0 or 1. You'll then see the proper utilization.

$\endgroup$
  • $\begingroup$ I did that. Unfortunately, I do not see a corresponding spike in GPU usage. $\endgroup$ – Shredderroy Oct 23 '18 at 6:43
0
$\begingroup$

Do you have the same issue when you run the example

n = 100;
trainingData = RandomReal[1, {n, 4}] -> RandomReal[1, {n, 4}];
net = NetChain[{8, Tanh, 2048, Tanh, 2048, Tanh, 4}];
trained = NetTrain[net, trainingData, TargetDevice -> "GPU"]

I have a Nvidia M1000M with driver 391.03 on windows 10 (1607) and Intel graphics 530 in a HP ZBook g3.

$\endgroup$
  • $\begingroup$ Unfortunately, yes. I still see a spike in CPU usage, but not in GPU usage. $\endgroup$ – Shredderroy Oct 23 '18 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.