Lc0 settings for Leela on GPU- Nvidia RTX 2080

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

Moderators: hgm, Rebel, chrisw

viditchess
Posts: 20
Joined: Mon Feb 16, 2015 1:58 pm

Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by viditchess »

Hi guys,
The title says it all. Could anyone tell me what are the ideal settings for lc0 on the GPU, RTX 2080. I have downloaded the lc0 0.21 version and the network 32930.

P.S the processor is Ryzen thread ripper 2950x, if it matters.

Thanks!
Grandmaster 2617
Chessqueen
Posts: 5582
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by Chessqueen »

viditchess wrote: Tue Feb 26, 2019 3:46 pm Hi guys,
The title says it all. Could anyone tell me what are the ideal settings for lc0 on the GPU, RTX 2080. I have downloaded the lc0 0.21 version and the network 32930.

P.S the processor is Ryzen thread ripper 2950x, if it matters.

Thanks!

http://blog.lczero.org/2018/09/guide-se ... s-gui.html
You can also go into Youtube.com for step by step instructions.
You can also Overclock it, here is how to do it==>
https://www.youtube.com/watch?v=JtPF1g-hBNM
Do NOT worry and be happy, we all live a short life :roll:
User avatar
sincerelybrent
Posts: 47
Joined: Fri Feb 15, 2019 11:41 pm
Full name: Brent M

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by sincerelybrent »

Settings to change:
NNcache = 2x - 10x your kNs for games, so maybe 800000 to 1 million? Use 10 million or more for long analysis
Backend = cudnn-fp16 for your card
Cpuct = 3.4
Cpuct base = 10000
Cpuct factor = 2.3
Fpu reduction = 1.1
Max collision visits = 256

You should also get your Leela ratio, so you’re not giving too much power (kNps) to either GPU or CPU: https://github.com/dkappe/leela-ratio

I’ve typed the process for getting your Leela ratio here: http://westportchessclub.org/public/com ... -ratio.txt. Or, you could just ask people who have similar rigs what their ratio is and match that. I’d suggest using only 4 CPUs for CPU engines on your rig as a start. More than that will favor CPU engines.

Download the latest NVIDIA drivers, too.

Good luck!
Last edited by sincerelybrent on Tue Feb 26, 2019 4:38 pm, edited 1 time in total.
Chessqueen
Posts: 5582
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by Chessqueen »

Chessqueen wrote: Tue Feb 26, 2019 4:06 pm
viditchess wrote: Tue Feb 26, 2019 3:46 pm Hi guys,
The title says it all. Could anyone tell me what are the ideal settings for lc0 on the GPU, RTX 2080. I have downloaded the lc0 0.21 version and the network 32930.

P.S the processor is Ryzen thread ripper 2950x, if it matters.

Thanks!

http://blog.lczero.org/2018/09/guide-se ... s-gui.html
You can also go into Youtube.com for step by step instructions.
You can also Overclock it, here is how to do it==>
https://www.youtube.com/watch?v=JtPF1g-hBNM
How to Setup Leela on Youtube ==>
https://www.youtube.com/results?search_ ... with+Arena+

https://www.youtube.com/watch?v=U6cb_xcMm0U

https://www.youtube.com/watch?v=r8U45zcUBN4
Last edited by Chessqueen on Tue Feb 26, 2019 4:44 pm, edited 3 times in total.
Do NOT worry and be happy, we all live a short life :roll:
crem
Posts: 177
Joined: Wed May 23, 2018 9:29 pm

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by crem »

viditchess wrote: Tue Feb 26, 2019 3:46 pm Hi guys,
The title says it all. Could anyone tell me what are the ideal settings for lc0 on the GPU, RTX 2080. I have downloaded the lc0 0.21 version and the network 32930.

P.S the processor is Ryzen thread ripper 2950x, if it matters.

Thanks!
The most important setting that is not default is
--backend=cudnn-fp16
(it will improve nps a lot, and default is just cudnn without fp16).

For other params defaults are good enough, you can fine-tune them to squeeze some more strength, but those will give only small improvements.
viditchess
Posts: 20
Joined: Mon Feb 16, 2015 1:58 pm

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by viditchess »

Thank you, everyone, for their valuable inputs. I put 4 threads and changed backend to fp16. It seems to be working fine. What is the ideal way to see its speed?
Grandmaster 2617
User avatar
sincerelybrent
Posts: 47
Joined: Fri Feb 15, 2019 11:41 pm
Full name: Brent M

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by sincerelybrent »

If you “only” have one GPU, the ideal thread count is 2.
viditchess
Posts: 20
Joined: Mon Feb 16, 2015 1:58 pm

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by viditchess »

Oh okay! Changed the threads to 2.

How do I find its speed?
Grandmaster 2617
User avatar
sincerelybrent
Posts: 47
Joined: Fri Feb 15, 2019 11:41 pm
Full name: Brent M

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by sincerelybrent »

Start analyzing positions, watch the kNs is best imo
Hugo
Posts: 782
Joined: Tue Dec 01, 2009 11:10 am

Re: Lc0 settings for Leela on GPU- Nvidia RTX 2080

Post by Hugo »

Hi

these are my lc0.config settings:
--backend=cudnn-fp16
--threads=4
--nncache=20000000
--slowmover=0.800
--max-collision-events=256
--minibatch-size=1024
--syzygy-paths=E:\syzygy-5;E:\6-wdl;E:\6-dtz
I am using a RTX2070 @ 1900MHz
PC is a i7 6700 quad / 8 threads @ 4.0 GHz and 16 GB RAM.

in console mode with net 41191 and command go nodes 2500000
I get arround 35500 nps when its done
regards, C.K.