# Why doesn't NetTrain use GPU as TargetDevice?

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.

• 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. – halirutan Oct 22 '18 at 8:05
• @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. – Shredderroy Oct 22 '18 at 17:08

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.

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

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.

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