LCZero GPU memory requirements?

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Geonerd
Posts: 48
Joined: Fri Mar 10, 2017 12:44 am

LCZero GPU memory requirements?

Post by Geonerd » Sun Dec 09, 2018 4:17 am

Looking to by a 'basic' card to run the engine, a modest used GTX 1060, or just maybe a 1070 if I can find a screaming deal. (Anything wrong with a GTX980?) Is 3 GB enough, or should I pop for the 6 GB version. And do all the 3 GB 1060 models come with 128 fewer CUDA cores activated?

Thanks

jorose
Posts: 163
Joined: Thu Jan 22, 2015 2:21 pm
Location: Zurich, Switzerland
Full name: Jonathan Rosenthal

Re: LCZero GPU memory requirements?

Post by jorose » Sun Dec 09, 2018 10:14 am

As a disclaimer, I am not actually all too familiar with the Leela codebase.

That being said I don't think it should be an issue. First of all, keep in mind people are using neural nets with much larger images than chess boards. If you have an image which is 1024x1024 (around half of "full HD") than it is around 16'000 times the size of an 8x8.

The other point is that memory usage is dependent on batch size, which I believe is a parameter in Leela. If the memory is not enough you could reduce the batch size until it is enough. I don't really think you would need to do this with a card with that much memory though.
-Jonathan

jjoshua2
Posts: 7
Joined: Sat Mar 10, 2018 5:16 am

Re: LCZero GPU memory requirements?

Post by jjoshua2 » Sun Dec 09, 2018 7:36 pm

3gb is plenty for using leela as long as you don't plan to do supervised learning to do experiments on your own. Only downside is they do all have a few less cuda cores. A gtx 980 is probably faster than a 1060 (~2k nps), which I think is more like a 970. But a 2070 (30k) is even faster than a 1080 ti (about 10k). And if a 2050 and 2060 come out they will be much faster than previous generations assuming they still have tensor cores like all the other 20xx cards.

Geonerd
Posts: 48
Joined: Fri Mar 10, 2017 12:44 am

Re: LCZero GPU memory requirements?

Post by Geonerd » Mon Dec 10, 2018 1:03 am

jjoshua2 wrote:
Sun Dec 09, 2018 7:36 pm
3gb is plenty for using leela as long as you don't plan to do supervised learning to do experiments on your own. Only downside is they do all have a few less cuda cores. A gtx 980 is probably faster than a 1060 (~2k nps), which I think is more like a 970. But a 2070 (30k) is even faster than a 1080 ti (about 10k). And if a 2050 and 2060 come out they will be much faster than previous generations assuming they still have tensor cores like all the other 20xx cards.
Thanks! The recent Alpha-Zero releases have finally sparked an interest in Leela. I haven't been paying attention to gaming cards for several years.
Can I beg two more questions?
Can a single instance of LC0 make use of multiple GPU cards? If so, do they have to be matched?
How critical is GPU memory bandwidth for Leela? (I suspect there are a few cards out there that come with faster memory chips...)
8-)

shrapnel
Posts: 1142
Joined: Fri Nov 02, 2012 8:43 am
Location: New Delhi, India

Re: LCZero GPU memory requirements?

Post by shrapnel » Mon Dec 10, 2018 3:11 am

I don't understand why you want to buy a Card which is already obsolete.
With the steady improvement of Lc0 and possible commercialization of AlphaZero, the Gamers with the fastest and best Graphic Cards (not the CPU any longer) will have the advantage.
If I was in the market for a new Graphic Card, I would buy the best I could afford...and hence put off upgrading for a longer time.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Asus ROG Strix 11 GB Geforce 1080 Ti and AMD Ryzen 7 1800X @4.0 GHz, 32 GB DDR4-2400 G.Skill RAM, ASUS Prime x370-PRO, Noctua NH-D15 SE-AM4 Cooler.

Geonerd
Posts: 48
Joined: Fri Mar 10, 2017 12:44 am

Re: LCZero GPU memory requirements?

Post by Geonerd » Mon Dec 10, 2018 5:12 am

shrapnel wrote:
Mon Dec 10, 2018 3:11 am
I don't understand why you want to buy a Card which is already obsolete.
With the steady improvement of Lc0 and possible commercialization of AlphaZero, the Gamers with the fastest and best Graphic Cards (not the CPU any longer) will have the advantage.
If I was in the market for a new Graphic Card, I would buy the best I could afford...and hence put off upgrading for a longer time.
Excuse me, but it's my money and I will spend it as I like. Computer chess is a minor hobby, and I have no need or desire to throw big chunks of cash at it. My main A/B computer is an 'obsolete' dual Opteron. It's got 24 cores, 48 gig(!) of ram, and it runs conventional engines as well as an 8c/16t Ryzen. It also makes a pretty darn good video and photo editing platform. Total cost was just under $300, an easily justified expense for an eccentric, cheap-ass build.

For now, I just want something to play around with, and a $100~150 GPU is entirely appropriate. And even if I really catch the NN bug, I'll likely wait to see how well Navi performs before buying a mid-high end card.

To my knowledge, there is no LC0 hardware FAQ that discusses the simple questions I've asked. (Maybe I'm overthinking and should just go with raw CUDA benchmarks?) If you don't want to answer, or don't know, fine, but FFS, please don't presume to lecture me. And BTW why aren't you bitching as Laskos for buying an OMG OBSOLETE!! 1070?

Post Reply