Two GPUs

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Werewolf
Posts: 1795
Joined: Thu Sep 18, 2008 10:24 pm

Two GPUs

Post by Werewolf »

Just trying an experiment with Lc0.

To use two graphics cards, should they be set to run in SLI or independently?

Thanks
smatovic
Posts: 2639
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Two GPUs

Post by smatovic »

Werewolf wrote: Thu Jan 17, 2019 7:55 pm Just trying an experiment with Lc0.

To use two graphics cards, should they be set to run in SLI or independently?

Thanks
SLI has only effect for rendering graphics in video games,
so you do not need to set up SLI for Cuda or OpenCL.

--
Srdja
Javier Ros
Posts: 200
Joined: Fri Oct 12, 2012 12:48 pm
Location: Seville (SPAIN)
Full name: Javier Ros

Re: Two GPUs

Post by Javier Ros »

Werewolf wrote: Thu Jan 17, 2019 7:55 pm Just trying an experiment with Lc0.

To use two graphics cards, should they be set to run in SLI or independently?

Thanks
You must choose which GPU to use, or both, gpu=0 is for the first GPU and gpu=1 the second, for example in Cutechess

-engine name="Lc0201_32644" cmd="lc0.exe" option.Threads=4 nodes=8000 option.Backend=multiplexing option.BackendOptions="(backend=cudnn,gpu=0),(backend=cudnn,gpu=1)"

for use both GPU in Arena you must set:

Backend: Multiplexing
BackendOptions: (backend=cudnn,gpu=0),(backend=cudnn,gpu=1)
Werewolf
Posts: 1795
Joined: Thu Sep 18, 2008 10:24 pm

Re: Two GPUs

Post by Werewolf »

Javier Ros wrote: Fri Jan 18, 2019 12:04 am

for use both GPU in Arena you must set:

Backend: Multiplexing
BackendOptions: (backend=cudnn,gpu=0),(backend=cudnn,gpu=1)
For the RTX cards presumably it'd look like this:

Backend: Multiplexing
BackendOptions: (backend=cudnn-fp16,gpu=0),(backend=cudnn-fp16,gpu=1)
Javier Ros
Posts: 200
Joined: Fri Oct 12, 2012 12:48 pm
Location: Seville (SPAIN)
Full name: Javier Ros

Re: Two GPUs

Post by Javier Ros »

Werewolf wrote: Fri Jan 18, 2019 9:46 am
Javier Ros wrote: Fri Jan 18, 2019 12:04 am

for use both GPU in Arena you must set:

Backend: Multiplexing
BackendOptions: (backend=cudnn,gpu=0),(backend=cudnn,gpu=1)
For the RTX cards presumably it'd look like this:

Backend: Multiplexing
BackendOptions: (backend=cudnn-fp16,gpu=0),(backend=cudnn-fp16,gpu=1)
Yes
User avatar
mclane
Posts: 18748
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: Two GPUs

Post by mclane »

Javier Ros wrote: Fri Jan 18, 2019 10:00 am
Werewolf wrote: Fri Jan 18, 2019 9:46 am
Javier Ros wrote: Fri Jan 18, 2019 12:04 am

for use both GPU in Arena you must set:

Backend: Multiplexing
BackendOptions: (backend=cudnn,gpu=0),(backend=cudnn,gpu=1)
For the RTX cards presumably it'd look like this:

Backend: Multiplexing
BackendOptions: (backend=cudnn-fp16,gpu=0),(backend=cudnn-fp16,gpu=1)
Yes
What is the difference in these two parameters ??
I do have an old pc with an old GTX 690.
It has 2 gpu cores.
I tried the first parameters and it looks like then both gpus are running 100 %.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
Javier Ros
Posts: 200
Joined: Fri Oct 12, 2012 12:48 pm
Location: Seville (SPAIN)
Full name: Javier Ros

Re: Two GPUs

Post by Javier Ros »

mclane wrote: Fri Jan 18, 2019 8:11 pm
Javier Ros wrote: Fri Jan 18, 2019 10:00 am
Werewolf wrote: Fri Jan 18, 2019 9:46 am
Javier Ros wrote: Fri Jan 18, 2019 12:04 am

for use both GPU in Arena you must set:

Backend: Multiplexing
BackendOptions: (backend=cudnn,gpu=0),(backend=cudnn,gpu=1)
For the RTX cards presumably it'd look like this:

Backend: Multiplexing
BackendOptions: (backend=cudnn-fp16,gpu=0),(backend=cudnn-fp16,gpu=1)
Yes
What is the difference in these two parameters ??
I do have an old pc with an old GTX 690.
It has 2 gpu cores.
I tried the first parameters and it looks like then both gpus are running 100 %.
These parameters are for two physically different cards, on a motherboard that supports two PCIE slots.
User avatar
M ANSARI
Posts: 3707
Joined: Thu Mar 16, 2006 7:10 pm

Re: Two GPUs

Post by M ANSARI »

I am also thinking of setting up 2 GPU's for LC0. So is this code to be added to the .dll files? How do you get Leela to use both GPU's on CB GUI? Just install the UCI engine and add an edited .txt file?

How about if you do setup in SLI, will LC0 consider 2 x GPU's as one GPU if SLI or Crossfire is used?
Javier Ros
Posts: 200
Joined: Fri Oct 12, 2012 12:48 pm
Location: Seville (SPAIN)
Full name: Javier Ros

Re: Two GPUs

Post by Javier Ros »

M ANSARI wrote: Sat Jan 19, 2019 8:24 am I am also thinking of setting up 2 GPU's for LC0. So is this code to be added to the .dll files? How do you get Leela to use both GPU's on CB GUI? Just install the UCI engine and add an edited .txt file?

How about if you do setup in SLI, will LC0 consider 2 x GPU's as one GPU if SLI or Crossfire is used?

I do not know the answer to the last question.

No SLI required, no txt file, in Chessbase you must only Create UCI Engine,
in Parameter, you must set Backend to Multiplexing and in BackendOptions you must write
(backend=cudnn,gpu=0),(backend=cudnn,gpu=1)

It is advisable to add to the name the version 32xxx and set Priority to Below Normal (recommended for all engines)
smatovic
Posts: 2639
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: Two GPUs

Post by smatovic »

M ANSARI wrote: Sat Jan 19, 2019 8:24 am How about if you do setup in SLI, will LC0 consider 2 x GPU's as one GPU if SLI or Crossfire is used?
SLI and Crossfire are only used for generating graphics, Cuda and OpenCL con not use these.

SLI was introduced with the Vodoo 2 3D-accelerator cards by 3dfx,
the technique splits the graphics workload across the gpus,
imagine that one gpu renders only the odd frames and one gpu renders only the even frames.

https://en.wikipedia.org/wiki/Scalable_Link_Interface

--
Srdja