Page 1 of 2

Two GPUs

Posted: Thu Jan 17, 2019 6:55 pm
by Werewolf
Just trying an experiment with Lc0.

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

Thanks

Re: Two GPUs

Posted: Thu Jan 17, 2019 7:12 pm
by smatovic
Werewolf wrote:
Thu Jan 17, 2019 6: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

Re: Two GPUs

Posted: Thu Jan 17, 2019 11:04 pm
by Javier Ros
Werewolf wrote:
Thu Jan 17, 2019 6: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)

Re: Two GPUs

Posted: Fri Jan 18, 2019 8:46 am
by Werewolf
Javier Ros wrote:
Thu Jan 17, 2019 11:04 pm


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)

Re: Two GPUs

Posted: Fri Jan 18, 2019 9:00 am
by Javier Ros
Werewolf wrote:
Fri Jan 18, 2019 8:46 am
Javier Ros wrote:
Thu Jan 17, 2019 11:04 pm


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

Re: Two GPUs

Posted: Fri Jan 18, 2019 7:11 pm
by mclane
Javier Ros wrote:
Fri Jan 18, 2019 9:00 am
Werewolf wrote:
Fri Jan 18, 2019 8:46 am
Javier Ros wrote:
Thu Jan 17, 2019 11:04 pm


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 %.

Re: Two GPUs

Posted: Fri Jan 18, 2019 8:10 pm
by Javier Ros
mclane wrote:
Fri Jan 18, 2019 7:11 pm
Javier Ros wrote:
Fri Jan 18, 2019 9:00 am
Werewolf wrote:
Fri Jan 18, 2019 8:46 am
Javier Ros wrote:
Thu Jan 17, 2019 11:04 pm


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.

Re: Two GPUs

Posted: Sat Jan 19, 2019 7:24 am
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?

Re: Two GPUs

Posted: Sat Jan 19, 2019 9:31 am
by Javier Ros
M ANSARI wrote:
Sat Jan 19, 2019 7: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)

Re: Two GPUs

Posted: Sat Jan 19, 2019 11:47 am
by smatovic
M ANSARI wrote:
Sat Jan 19, 2019 7: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