NodeODM:GPU support for multiple GPUs?

If the computer has multiple GPUs does NodeODM:GPU use them, or does it only use one GPU?

1 Like

Only one currently (but we’d welcome contributions to add support for more!)

3 Likes

When you have multiple GPUs, is there a way to tell NodeODM:GPU to use a specific GPU?
I just added a 12GB GPU to test, but nodeodm:gpu always chooses the 3GB GPU…I took a guess and tried --gpus 0 and --gpus 1 command line options but it had no effect.

1 Like

Support for multiple GPUs needs some work; feature extraction just chooses the first one, whereas OpenMVS tries to pick the fastest card (not sure if it guesses correctly all of the times).

1 Like

I’ll figure out a way to log the utilisation of each GPU and run a test to see if it uses only the GeForce GPU or uses the Tesla GPU at any stage.

1 Like

Ok test completed - it only used the GeForce GPU, didn’t touch the Tesla GPU.

1 Like

I found a way to disable GPUs so WebODM/NodeODM uses the GPU you want it to.

  1. Find out the PCI device ID of the GPU to be disabled:
    [email protected]:~$ lspci
    0a:00.0 3D controller: NVIDIA Corporation GK180GL [Tesla K40c] (rev a1)
    0b:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 3GB] (rev a1)
    0b:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
  2. Use nvidia-ami to get GPU ID numbers:
    [email protected]:~$ nvidia-smi -L
    GPU 0: Tesla K40c (UUID: GPU-e8ecfe9b-eccf-5827-772f-650ef8298262)
    GPU 1: NVIDIA GeForce GTX 1060 3GB (UUID: GPU-505500e5-1f86-dfb9-1d33-2fce6d27c118)
  3. Disable persistence mode for the desired GPU:
    [email protected]:~$ nvidia-smi -i 1 -pm 0
    Persistence mode is already Disabled for GPU 00000000:0B:00.0.
    All done.
  4. Disable the desired GPU:
    [email protected]:~$ sudo nvidia-smi drain -p 0000:0B:00.0 -m 1
    Successfully set GPU 00000000:0B:00.0 drain state to: draining.
  5. Check only the desired GPU is available now:
    [email protected]:~$ nvidia-smi -L
    GPU 0: Tesla K40c (UUID: GPU-e8ecfe9b-eccf-5827-772f-650ef8298262)
  6. When you want to re-enable the other GPU(s):
    [email protected]:~$ sudo nvidia-smi drain -p 0000:0B:00.0 -m 0
    Successfully set GPU 00000000:0B:00.0 drain state to: not draining.
    [email protected]:~$ nvidia-smi -L
    GPU 0: Tesla K40c (UUID: GPU-e8ecfe9b-eccf-5827-772f-650ef8298262)
    GPU 1: NVIDIA GeForce GTX 1060 3GB (UUID: GPU-505500e5-1f86-dfb9-1d33-2fce6d27c118)
5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.