Forum

Author Topic: Scipt to turn on/off GPU  (Read 1855 times)

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Scipt to turn on/off GPU
« on: October 04, 2021, 07:37:32 PM »
Hello.

I don't know if this overview is still up to date:

https://www.pugetsystems.com/labs/articles/Agisoft-Metashape-1-6-5---NVIDIA-GeForce-RTX-30-Series-Multi-GPU-Performance-2009/

At least in the 1.6.5 version it seems that in some areas the performance is better with just one GPU.
Could a graphics card be switched on/off via batch script for the specific task?

THX

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Scipt to turn on/off GPU
« Reply #1 on: October 05, 2021, 07:50:35 PM »
Hello c-r-o-n-o-s,

Do you mean to input the GPU mask for each task in the batch list (or to have the possibility to define custom GPU mask or confirm the use of the default GPU mask)?

And at which processing stages do you wish to do that?
Best regards,
Alexey Pasumansky,
Agisoft LLC

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Scipt to turn on/off GPU
« Reply #2 on: October 06, 2021, 10:23:04 AM »
Hello.

In the table from the link you can read that the generation of the dense point cloud and the creation of an orthomosaic with 2 graphics cards takes a little longer.
(However, this refers to version 1.6.5. I will do my own tests with the latest version in the next few days. )

If this is the case, you could first create the DEM with depth images and 2 graphics cards in a stack.
Then comes a script in the batch that turns off one graphics card.
Then the point cloud and the orthomosaic can be calculated with one graphics card. 

« Last Edit: October 06, 2021, 10:41:00 AM by c-r-o-n-o-s »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Scipt to turn on/off GPU
« Reply #3 on: October 06, 2021, 12:28:55 PM »
Hello c-r-o-n-o-s,

Dense cloud generation and orthomosaic generation are performed on CPU only, so enabling/disabling GPUs wouldn't take any effect on these stages.

Best regards,
Alexey Pasumansky,
Agisoft LLC

c-r-o-n-o-s

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: Scipt to turn on/off GPU
« Reply #4 on: October 06, 2021, 01:10:24 PM »
So, here is a result from my "quick and dirty" test.
It was not the optimal PC and project for this, but without GPU the point cloud is calculated about 2% faster.
( Average of 4 calculations with and without GPU. )

So really a small "overhead" but certainly negligible.
 ???
For very large projects, however, this can certainly add up to a few hours.
« Last Edit: October 06, 2021, 01:34:22 PM by c-r-o-n-o-s »