Installing DeepSpeech GPU version - do i need to install Tensorflow-GPU also?

or does the DeepSpeech install add the correct version of tensorflow-gpu? (i have looked in the manual [https://deepspeech.readthedocs.io/en/latest/USING.html] and i cannot see anything obvious that tells me this)

i have just tried installing both DS CPU and DS GPU and there is no difference in inference speeds, hence my question. there may be some other reason why DS-GPU is not invoking my installed gpu. in fact i have two gpus, a P104 and GT710. the latter is only there to give monitor output, but i wonder if it is interfering with DS or Tensorflow and stopping it/them using the P104?

You need to document whether you are referring to training or inference from the lib. In both case, tensorflow is a dependency (python wheel dep in the training case, static linkage in the lib case). So you don’t have to install anything manually.

Please share exact repro steps, we can’t know what you did by “installed both” …

inference = from the audio samples (not training).

DS CPU = sudo pip3 install deepspeech
DS GPU = sudo pip3 install deepspeech-gpu

then i ran:

deepspeech --model deepspeech-0.9.3-models.pbmm --scorer deepspeech-0.9.3-models.scorer --audio my_audio_file.wav

the inference time was .5 secs in both cases, though i did notice that in the case of the CPU the first time i ran it, it was more 1.5 secs inference time. running the GPU version a second time made no difference (in fact it was a tiny fraction longer).

is this the kind of repro info you mean?

How long is the audio ? Have you verified CUDA deps?

Please don’t, this is messing with everything we document. Especially, you are not leveraging your virtualenv and you might have a mix of CPU and GPU libs somewhere …

You should also mention the length of this file ; based on the processing times you shared, it’s a few seconds at most, CUDA has some setup costs and it will not go much much faster than CPU on a small dataset.

Inference took 0.486s for 1.975s audio file.
and the audio file is the sample “experience proves this” (from the DS samples)

i believe that i verified the CUDA deps when i installed them, but i can check again.

re

Please don’t, this is messing with everything we document. Especially, you are not leveraging your virtualenv and you might have a mix of CPU and GPU libs somewhere

i don’t fully understand. i am using sudo because i was told to do so. or do you mean that i should not try to install two different versions of DS on the same machine, even in virtual environments? if i should not do this, i don’t know how i can compare inferences with and without GPU. maybe there is another and better way of doing it.

thanks for the info re short audio files and setup costs. i will try something more like twenty seconds.

Who told you ? I explicitely stated you should not.

I never said that, please. it’s perfectly fine to setup two virtualenv side by side …