Colab on local GPU: 1060 twice as fast as 3070 - gpu

I recently bought a RTX 3070 laptop. I finally managed to get chrome to use the GPU (it just would not use the dedicated GPU even for youtube). Now I`m comparing it to my old laptop, and the same code in colab local runtime runs twice as fast on my 1060 than my new 3070.
Does anybody have any idea what could be causing this?
Thank you.

Related

How to install cuDF on google colab with GPU Tesla K80?

I am trying to install cuDF on Google Colab for hours. One of the requirements I should install cuDF with GPU Tesla T4. While google colab gives me every time GPU Tesla K80 and I cannot install cuDF. I tried this snippet of code to check what type of GPU I have every time:
import pynvml
pynvml.nvmlInit()
handle = pynvml.nvmlDeviceGetHandleByIndex(0)
device_name = pynvml.nvmlDeviceGetName(handle)
if device_name != b'Tesla T4':
raise Exception("""
Unfortunately this instance does not have a T4 GPU.
Please make sure you've configured Colab to request a GPU instance type.
Sometimes Colab allocates a Tesla K80 instead of a T4. Resetting the instance.
If you get a K80 GPU, try Runtime -> Reset all runtimes...
""")
else:
print('Woo! You got the right kind of GPU!')
It is too frustrating to get specific type of GPU by google colab because it is kind of a luck. I am asking here to see if someone experienced the same issue, and how was it solved?
The K80 use Kepler GPU architecture, which is not supported by RAPIDS. Colab itself no longer can run the latest versions of RAPIDS. You can try SageMaker Studio Lab for your Try it Now experience. https://github.com/rapidsai-community/rapids-smsl.

Tensorflow model slower than in the documentation

I am using the code at: https://keras.io/examples/imdb_fasttext/ for testing the performance of my PC. I have GTX 2060, Ubuntu 18.04, Tensorflow 2.0, Cuda 10.1, cuDNN7.6. I got 22 secs/epoch using the bi-grams, however according to this page, only 2 secs/epoch are needed in a GTx 980M GPU. I was hoping to have a second per epoch with my configuration.
Can anyone help me understand what could be the issue?
Many thanks,
Roxana

do I have to reinstall tensorflow after changing gpu?

I'm using tensorflow with gpu. My computer have NVIDIA gforce 750 ti and I'm gonna replace it with 1080 ti. do I have to re install tensorflow(or other drivers etc.)? If it is true, what exactly do I have to re-install?
One more question, Can I speed up the training process by install one more gpu in the computer?
As far as I know the only thing you need to reinstall are the GPU drivers (CUDA an/or cuDNN). If you install the exact same version with the exact same bindings Tensorflow should not notice you changed the GPU and continue working...
And yes, you can speed up the training process with multiple GPUs, but telling you how to install and manage that is a bit too broad for a Stackoverflow answer....

Tensorflow gpu version running out of memory with 16GB RAM and 8 GB GPU Nvidia Quadro M4000

I am working on tensorflow using GPU a Nvidia Quadro M4000 8GB graphic card.
I am having a issue of memory error. I have tried using memory growth method but still facing the same.
ResourceExhaustedError: OOM when allocating tensor with shape[1,64,1228,1029]
here the shape [1,64,1228,1029] comes after the first pooling layer
Everything is been installed on Windows 7:
python3.5.2
virtualenv
cuda toolkit 8.0
cudnn 5.1
Well, as this is only 323 megabytes only allocating this tensor should not be the only problem.
Try to see what other tensors you are allocating in your program. Most likely you are allocating many of this size, or many others somewhere in your program.
Another problem you might have is that you are running multiple programs at the same time. Try running the nvidia-smi equivalent in Windows to see how much memory your card is using at the moment.

Caffe and Tensorflow on a Dell 7559 with nvidia optimus technology

I bought a dell 7559 laptop for deep learning. I got ubuntu 16.04 installed on it but I am having trouble getting caffe and tensorflow on it. The laptop used Nvidia Optimus technology to switch between gpu and cpu to save battery usage. I checked the bios to see if I can set it to use only gpu but there is no option for it. Using bumblebee or nvidia-prime didnt work either. I now have ubuntu 16 with mate desktop environment it is preventing from getting the black screen but didnt help with the cuda issue. I was able to install the drivers and cuda but when I build caffe and tensorflow they fail saying that it didnt detect a gpu. And I wasnt able to install opengl. I tried using several versions of nvidia drivers but it didnt help. Any help would be great. thanks.
I think Bumblebee can enable you to run Caffe/Tensorflow in GPU mode. More generally, it also allows you to run other CUDA programs on a laptop with Optimus technology .
When you have installed Bumblebee correctly (tutorial: Bumblebee Wiki for Ubuntu ), you can invoke the Caffe binary by pepending optirun before the caffe binary. So it goes like the following:
optirun ../../caffe-master/build/tools/caffe train --solver=solver.prototxt
This works for the NVidia DIGITS server as well:
optirun ./digits-devserver
In addition, Bumblebee also works on my dual-graphics desktop PC (Intel HD 4600 + GTX 750 Ti) as well. The display on my PC is driven by the Intel HD 4600 through the HDMI port on the motherboard. The NVidia GTX 750 Ti is only used for CUDA programs.
In fact, for my desktop PC, the "nvidia-prime" (it's actually invoked through the command line program prime-select) is used to choose the GPU that drives the desktop. I have the integrated GPU connect to the display with the HDMI port and the NVidia GPU through a DisplayPort. Currently, the DisplayPort is inactive. The display signal comes from the HDMI port.
As far as I understand, PRIME does so by modifying /etc/X11/Xorg.conf to make either the Intel integrated GPU or the NVidia GPU the current display adapter available to X. I think the PRIME settings only makes sense when both GPUs are connected to some display, which means there need not be an Optimus link between the two GPUs like in a laptop (or, for a laptop with a Mux such as Dell Precision M4600, the Optimus is disabled in BIOS).
More information about the Display Mux and Optimus may be found here: Using the NVIDIA Driver with Optimus Laptops
Hope this helps!