Choosing CPU for linear algebra: AMD 9950X or something else?

I am considering getting a new computer with at least 64GB RAM for computation that involves doing lots of linear algebra (matrix-matrix multiplications and solving linear systems). For my purposes, I would prefer not dealing with GPU but just focus on CPU with double precision computation. For a similar price (several hundred bucks on CPU), would you consider AMD 9950X a good choice or would you recommend something else from Intel or Apple?

1 Like

I’m not sure why you don’t want to deal with GPUs. GPU programming in general can be hard for sure, but matrix multiplication can involve just using cuBLAS.

If you can’t deal with GPUs (either due to latency time not being worth multiplying the matrix, double precision not being really well-supported on GPUs, or so on), then you need CPUs with SIMD, and then multiple cores. AMD 9950X looks like a good choice.

However, if you’re dealing with large matrices and not a bunch of small matrices…not sure why you wanna stick to CPUs.

I’d definitely go with the 9950x unless you have a specific reason to want an Apple machine (such as strongly preferring MacOS or wanting this machine to be a laptop with reasonable battery life).

A lot of people have been complaing about Zen 5 being a small improvement over Zen 4, but if you care about linear algebra, the AVX 512 improvements to Zen 5 are going to be a huge difference maker. The 9950x has full on AVX 512 and unlike Intel, can do it without downclocking.

There’s some nice benchmark results here comparing it to the 7950x: https://www.phoronix.com/review/amd-zen5-avx-512-9950x.

Intel’s 14900k is almost as fast as the 9950x for linear-algebra like tasks, but has potentially fatal hardware flaws (Intel is now claiming they have a fix to stop further degradation but who knows, I wouldn’t bet on it), and uses way more power so I don’t really think it’s worth considering unless you have a specific reason to want to go with Intel.

Maybe check the price of a modern GPU with 64GB of VRAM and float64 support and then compare it to a 9950x.

7 Likes

Also check GPU slower than CPU for simple benchmarks - #3 by ufechner7 for GPUs with good Float64 performance.

1 Like

very useful