Why a 2070 Max-Q takes longer time for training a Neural Network than a GTX 960m?

Viewed 139

I have two laptops, both with Windows 10, that I use for work:

  1. MSI GE70: i7 4720, 12 GB Ram, GTX 960m 2GB, 258 GB SSD.
  2. Dell G7: i7 9750, 32 GB Ram, RTX 2070 Max-Q 8Gb, 500 GB SSD.

I made a 'mirror' installation of TensorFlow in both laptops following the official TensorFlow page.

In both laptops I installed Python 3.6.8, TensorFlow 2.2, CUDA 10.1, cuDNN 7.6 and 456.71 Nvidia Driver version. When I run the following line in CMD I can see that both GPUs are visibles to TensorFlow and ready to use.

python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))

MSI with 960m

Dell with 2070 Max-Q

Then, when I train the same Neural Network in both laptops, I can see that the MSI takes 7 minutes per epoch, while the Dell G7 takes almost an one hour per epoch. Why the GPU 2070 Max-Q takes so longer time for train the Neural Network in comparison with the 960m? There is some problem with the Dell G7 that I can't see?

This is the structure of the NN:

modelo=Sequential()

modelo.add(Bidirectional(LSTM(units=na, return_sequences=True),input_shape=dim_entrada))
modelo.add(Dropout(0.25))
modelo.add(Bidirectional(LSTM(units=na)))
modelo.add(Dropout(0.25))
modelo.add(Dense(units=3))

opt = tf.optimizers.Adam(learning_rate=0.0015)
modelo.compile(optimizer=opt, loss='mse', metrics=['accuracy'])

modelo.fit(X_train,Y_train,epochs=20,batch_size=32,validation_data=(X_validacion_imu12,Y_validacion_vi12))
1 Answers

I found the problem. I don't know why but the Dell G7 must be plugged into electricity. I think is a power option that prevents the use of the GPU if it is not plugged in.

Related