M1 Apple Silicon for Chess?

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

Moderators: hgm, Rebel, chrisw

User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: M1 Apple Silicon for Chess?

Post by jshriver »

Raphexon wrote: Tue Dec 08, 2020 10:06 am Future might be Risc-V regardless but Nvidia-ARM will definitely make risc-v more attractive.
As an architecture geek I'm rooting for Risc-V too, or at least enough to see it have commercial adoption. Would love to have a box now, but the few SBC's I've seen have been pretty cost prohibitive and more for testing purposes.
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

Re: M1 Apple Silicon for Chess?

Post by Alayan »

syzygy wrote: Tue Dec 08, 2020 11:16 pm So you agree that x86 is going the way of the light bulb.
I take you not bothering to answer to my message as meaning that you have not a single counterpoint to what I said.
syzygy
Posts: 5569
Joined: Tue Feb 28, 2012 11:56 pm

Re: M1 Apple Silicon for Chess?

Post by syzygy »

Alayan wrote: Wed Dec 09, 2020 1:13 am
syzygy wrote: Tue Dec 08, 2020 11:16 pm So you agree that x86 is going the way of the light bulb.
I take you not bothering to answer to my message as meaning that you have not a single counterpoint to what I said.
Or I just spend my time wisely. My intention here was just to point out the in my view unwarranted negativity. It reminds me of the initial reception in this forum of Alpha Chess Zero (and many here will probably still deny that LC0 wouldn't have existed without Deepmind's papers).
User avatar
AlexChess
Posts: 1530
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

George Sobala wrote: Wed Nov 25, 2020 8:00 am Benchmarks on a MacBook Air 16GB 8-core GPU

Stockfish compiled for M1 Apple Silicon, commit f9595828eb7e5e970b0be3ee5f84ddd726845523 Wed 11 Nov

Code: Select all

bench	2408119
bench 64 1 20	2270034
bench 64 2 20	4503092
bench 64 4 20	9069926
bench 64 6 20	10820178
bench 64 8 20	12438598
Cfish compiled for M1 Apple Silicon, commit 6193ed1c3809cb4b71ad8f630fa4f52160390fb6 Sun 15 Nov

Code: Select all

bench	2844055
bench 64 1 20	2614400
bench 64 2 20	5232224
bench 64 4 20	10152288
bench 64 6 20	12388337
bench 64 8 20	14935531
dragon-ox running under Rosetta-2

Code: Select all

command  nodes  sec      nps
bench 1	1915866	4.80	399139
bench 2	3653649	4.70	777372
bench 4	5690302	3.36	1693542
lc0, compiled for M1 running on CPU using Apple's Accelerate framework, output of benchmark first position only:

Code: Select all

--backend=blas --weights=J92-330	 97
--backend=blas --weights=T70net-703810   1703
lc0, compiled for M1 running on GPU using OpenCL, output of benchmark first position only:

Code: Select all

--backend=opencl --weights=J92-330	   104
--backend=opencl --weights=T70net-703810   3431
Hi! Could you please give me the link to download LC0 and Cfish binary for Silicon M1? I already have Stockfish M1 (1 milion nps versus 6200 knps with Rosetta 2 on my Mac mini M1 8-256 GB) I can report here the results of my engine vs engine matches if you are interested.

Thank you in advance, AlexChess
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
kiroje
Posts: 60
Joined: Wed Jul 25, 2012 10:12 am
Location: Copenhagen, Denmark
Full name: Kim Jensen

Re: M1 Apple Silicon for Chess?

Post by kiroje »

I would really like to know how this one would perform https://shop.solid-run.com/product/SRLX ... E064H08CH/

Anyone that would speculate on that ?
“Modern chess is too much concerned with things like pawn structure. Forget it, checkmate ends the game.” – Nigel Short
User avatar
AlexChess
Posts: 1530
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

kiroje wrote: Sat Feb 06, 2021 6:31 pm I would really like to know how this one would perform https://shop.solid-run.com/product/SRLX ... E064H08CH/

Anyone that would speculate on that ?
Me :)
Yes, HoneyComb is wonderful.
If Trusted Computing wins, it will be my way. Ready to use Linux on ARM & open source. But until now, simply lowering a little the system protection, I'm able to use every application and OS with my surprising fast Mac mini M1. So, returning to the topic, I want to understand how to compile NATIVE Silicon M1 chess engines (I already have Stockfish ARM64 *1.1 Mnps* that easily wins against Ethereal 12.75 64 bit Rosetta 2)
Chess engines and dedicated chess computers fan since 1981 :D Mac mini M1 8GB-256GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum TROLLS KINDERGARTEN
BetaPro
Posts: 19
Joined: Wed Nov 25, 2020 7:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro »

George Sobala wrote: Wed Nov 25, 2020 10:02 am Comparison of Stockfish and Cfish running on 8 cores, classical v NNUE, on M1 and iMac Pro Xeon W

run using

stockfish|cfish 64 8 20 default depth classical|NNUE

Code: Select all

		        Stockfish	Cfish
M1	classical	16319718	17118388
M1	NNUE	        10100445	12759621
Xeon W	classical	16900088	17929299
Xeon W	NNUE	        13631405	14191552
iMac Pro compile options:

Code: Select all

george@Georges-iMac-Pro-2 ~ % stockfish 
Stockfish 141120 by the Stockfish developers (see AUTHORS file)
compiler

Compiled by g++ (GNUC) 10.2.0 on Apple
Compilation settings include:  64bit AVX512 BMI2 AVX2 SSE41 SSSE3 SSE2 POPCNT
__VERSION__ macro expands to: 10.2.0

quit
george@Georges-iMac-Pro-2 ~ % cfish
Cfish 141120 64 BMI2 by Syzygy based on Stockfish
compiler

Compiled by gcc (GNUC) 10.2.0 on Apple
Compilation settings include: 64bit AVX512 BMI2 AVX2 SSE41 SSSE3 SSE2 POPCNT
__VERSION__ macro expands to: 10.2.0

quit
From your benchmark, it looks like it's pretty solid, in NNUE it will be slower because ARM lacks good AVX support.

The SF classic result is much better, 4 big core and 4 small core matching Xeon's 8 big cores.

Can you also run just one thread for SF classic, for both M1 and Xeon? I'm very interested in single threaded performance of a CPU.

Thanks!
BetaPro
Posts: 19
Joined: Wed Nov 25, 2020 7:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro »

George Sobala wrote: Wed Nov 25, 2020 10:02 am Comparison of Stockfish and Cfish running on 8 cores, classical v NNUE, on M1 and iMac Pro Xeon W

run using

stockfish|cfish 64 8 20 default depth classical|NNUE

Code: Select all

		        Stockfish	Cfish
M1	classical	16319718	17118388
M1	NNUE	        10100445	12759621
Xeon W	classical	16900088	17929299
Xeon W	NNUE	        13631405	14191552
Actually I got impatient so I went on Scaleway and rented an M1.

Here's what I got with Stockfish Classical
./stockfish bench
3568884 nps

./stockfish bench 64 1 20
3024394 nps

./stockfish bench 64 8 20
17084333 nps

The Macbook 2019 that my workplace provided, which has a single thread Geekbench score of around 1050 gets this,
./stockfish bench
2168394 nps

./stockfish bench 64 1 20
1908261 nps

The Intel version was compiled with x86-64-bmi2. So the m1 is about 64% faster in ST than the Intel Mac, about in line with what Geekbench suggests. Would love it if someone with the latest Zen 3 do a similar test (especially single thread).
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: M1 Apple Silicon for Chess?

Post by Gian-Carlo Pascutto »

Performance of Stockfish dev from today looks like:

Code: Select all

Zen1 1700X 3.2GHz:     1520000
Ivy Bridge 3.5GHz:     1760000
Haswell 3.4GHz:        1860000
M1 3.2GHz:             2390000
Zen2 3900X 3.8-4.2GHz: 2490000
This is on an M1 Air. I love the fact that it's 100% fanless.
BetaPro
Posts: 19
Joined: Wed Nov 25, 2020 7:11 pm
Full name: Jean-Roy Lee

Re: M1 Apple Silicon for Chess?

Post by BetaPro »

That's also a pretty good result for M1, matching Zen 2 while having weaker vector instructions.

I'll pick an M1 up eventually. Overall seems better than any alternative. Pretty sure they will provide higher core count models as well, but I dont really need that many cores.