How do you know if your cpu is equal to your gpu?

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

Moderators: hgm, Rebel, chrisw

User avatar
Ozymandias
Posts: 1532
Joined: Sun Oct 25, 2009 2:30 am

Re: How do you know if your cpu is equal to your gpu?

Post by Ozymandias »

A lot of controversial HW configurations can be devised, that would raise questions at either side of the fence. The problem is a legitimate one and can't be dismissed with the sort of easy fixed I've seen proposed so far.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: How do you know if your cpu is equal to your gpu?

Post by jp »

Ozymandias wrote: Thu Jan 23, 2020 4:33 pm The problem is a legitimate one and can't be dismissed with the sort of easy fixed I've seen proposed so far.
A good idea proposed in the Leela forum long ago was to use the points at which Leela and SF start maxing out. With more nodes per move there are diminishing returns and when it's large the performance starts flatlining. Identify the points at which flatlining starts and use that ratio. That way, it's independent of hardware capabilities, etc.

I don't know if there was any follow-up on that idea. I think it deserves it. Apart from Leela CPU vs SF CPU, the other ideas feel too contrived.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: How do you know if your cpu is equal to your gpu?

Post by jp »

jp wrote: Fri Jan 24, 2020 9:53 am Identify the points at which flatlining starts and use that ratio. That way, it's independent of hardware capabilities, etc.
I just did a search for it, and here's what I found:

https://groups.google.com/forum/#!msg/l ... oJrjDgBQAJ
https://groups.google.com/forum/#!topic ... -0vilWxg8o


A good thing about Cscuile's idea is it encourages everyone to pay more attention to scaling and asymptotic behavior, instead of magical thinking about GPUs.
User avatar
Ozymandias
Posts: 1532
Joined: Sun Oct 25, 2009 2:30 am

Re: How do you know if your cpu is equal to your gpu?

Post by Ozymandias »

jp wrote: Sat Jan 25, 2020 10:01 ammagical thinking about GPUs.
Not sure what you mean by that.
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: How do you know if your cpu is equal to your gpu?

Post by jp »

Ozymandias wrote: Sat Jan 25, 2020 11:40 am Not sure what you mean by that.
Many on this forum and outside express the belief that all the computing GPUs do "doesn't count", although they don't state it like that, and nothing will make them change their minds.

They could also be the people who don't know or care about scaling, etc.
mig2004
Posts: 256
Joined: Wed Oct 02, 2013 12:36 am

Re: How do you know if your cpu is equal to your gpu?

Post by mig2004 »

This is not a trivial issue when it comes to chess performance. This is just the beginning of a search, that is, an introduction to a "problem" not clearly resolved: how to compare gpu to cpu performance.


The closest you can get, so far, to a "fair" comparisson is using FLOPS as a performance measure. Yet it is at best, a "partial" story.

In computing, floating point operations per second (FLOPS, flops or flop/s) is a measure of computer performance, useful in fields of scientific computations that require floating-point calculations. For such cases it is a more accurate measure than measuring instructions per second. Manufacturers frequently include FLOPS as a specification on computers so they can talk about how fast they are in a universal way.


The term FLOP is often used for floating-point operation, for example as a unit of counting floating-point operations carried out by an algorithm or computer hardware.

the derivative TFLOP is also used . It is a bit of shorthand for “teraflop.” A teraflop refers to the capability of a processor to calculate one trillion floating-point operations per second. Saying something has “6 TFLOPS,” for example, means that its processor setup is capable of handling 6 trillion floating-point calculations every second, on average.

Some modern workstation GPUs, such as the Nvidia Quadro workstation cards using the Volta and Turing architectures, feature dedicating processing cores for tensor-based deep learning applications. In Nvidia's current series of GPUs these cores are called Tensor Cores. These GPUs usually have significant FLOPS performance increases, utilizing 4x4 matrix multiplication and division, resulting in hardware performance up to 128 TFLOPS in some applications. These tensor cores are also supposed to appear in consumer cards running the Turing architecture, and possibly in the Navi series of consumer cards from AMD.


CPU in GFLOPS (1 gigaFLOP =10^9 FLOPS)
(....)
How many flops is an i7?
Linpack benchmark using the Intel MKL optimizations
  • Processor Brief Spec Linpack (GFLOPS)
    Dual Xeon E5 2687W 16 cores @ 3.2GHz AVX 345
    Core i7 5930K (Haswell E) 6 cores @ 3.5GHz AVX2 289
    Dual Xeon E5 2650 16 cores @ 2.0GHz AVX 262
    Core i7 4770K (Haswell) 4 cores @ 3.5GHz AVX2 182
Now what kind of activities are generating those flops? That's a crucial issue: some activities are highly parallelized, so that flops calculations result in much better end user performance on gpus than on cpus... something like leelachess, which is optimized for gpus on its CUDA AND OPENCL versions.

Note how very few people talk about the BLASS version of leelachess. It is the version optimized for CPU's.

Stockfish as such is engine optimized for cpu flops, a warning not compare to highly paralleliz software used in gpu.

A realistic performance between leela-gpu vs stockfish-cpu could be glanced in node search per seconds. An equivalence could be inferred on careful testing, but it will be an approximation. As useful as it is, nobody talks about doing one. Why?
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: How do you know if your cpu is equal to your gpu?

Post by jp »

mig2004 wrote: Tue Jan 28, 2020 5:15 pm node search per seconds.
Nodes is a very bad measure here. We could easily make SF do better and better on this measure by making it compute for an eternity on each node.
mmt
Posts: 343
Joined: Sun Aug 25, 2019 8:33 am
Full name: .

Re: How do you know if your cpu is equal to your gpu?

Post by mmt »

I think price is the best measure. The total should also include RAM cost, as programs could easily have different use requirements. Possibly even motherboard.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: How do you know if your cpu is equal to your gpu?

Post by Ovyron »

Ah, but then GPUs might use more energy over time, so the energy cost would eventually catch up to anything and would make the GPU non-cost effective no matter what.
mmt
Posts: 343
Joined: Sun Aug 25, 2019 8:33 am
Full name: .

Re: How do you know if your cpu is equal to your gpu?

Post by mmt »

Good point but the energy cost will only make a difference over months of 24h/day use. A 2080 ti uses around 280W (https://www.tomshardware.com/reviews/nv ... 05-10.html). U.S. consumer electricity cost is about $0.13/Kilowatthour (https://www.eia.gov/electricity/monthly ... epmt_5_6_a). So we get 365.25*24*0.13*0.28 = $319/year. Still, worth a consideration.