Apple M1 CPU & GPU speed is very disappointing

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

Moderator: Ras

Magnum
Posts: 195
Joined: Thu Feb 04, 2021 10:24 pm
Full name: Arnold Magnum

Apple M1 CPU & GPU speed is very disappointing

Post by Magnum »

There is a new very difficult discussion:
https://forums.macrumors.com/threads/ap ... 62/page-18
Start with page 18 today.
It could help the Stockfish and LC0 and Ceres developers a lot to improve these engines.
User avatar
Ras
Posts: 2699
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Ras »

Magnum wrote: Sun Nov 28, 2021 10:48 pmIt could help the Stockfish and LC0 and Ceres developers a lot to improve these engines.
There's nothing even remotely helpful on Macrumors, as usually. Face it - Apple builds proprietary silicon that doesn't work well with chess engines in the first place, then slaps proprietary APIs around it that nobody cares about, and expects developers to buy these overpriced Apple toys instead of cross-compiling because Apple thinks that ripping of also developers and not just users is more profitable. In a word, don't expect improvement.
Rasmus Althoff
https://www.ct800.net
Sopel
Posts: 391
Joined: Tue Oct 08, 2019 11:39 pm
Full name: Tomasz Sobczyk

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Sopel »

Image
dangi12012 wrote:No one wants to touch anything you have posted. That proves you now have negative reputations since everyone knows already you are a forum troll.

Maybe you copied your stockfish commits from someone else too?
I will look into that.
jdart
Posts: 4405
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Apple M1 CPU & GPU speed is very disappointing

Post by jdart »

That page is talking about Lc0, which is dependent on GPU speed. The M1 chips have an embedded GPU, which is not particularly powerful compared to dedicated external GPUs. It is not even clear Lc0 is compiled to use the native GPU, but even it was, you need big hardware to run Lc0 efficiently, beyond what you are going to find in a laptop.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Raphexon »

Can you tell us how to optimize SF specifically for the M1?

Even if you can use the neural engine, it will likely incur a huge latency hit. So useless for SF.
NEON is still shit so that won't be faster either.
Maybe movegen optimization? ARM may like mailboxes more than bitboards, there's your 2% speed increase.

If you modify SF's movegen you can always do a pull request on the official stockfish github page.
Please add the results of a SPRT test with your M1 when you post it. Thanks!
User avatar
Ras
Posts: 2699
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Ras »

Raphexon wrote: Mon Nov 29, 2021 10:03 amEven if you can use the neural engine, it will likely incur a huge latency hit. So useless for SF.
Plus that there's no clear public documentation on how to even use it. Apple somehow thinks that keeping their hardware secret even from programmers will somehow lead to useful software. Don't ask for any sort of reason in that because that's Apple - "think different".
Rasmus Althoff
https://www.ct800.net
wickedpotus
Posts: 153
Joined: Sun May 16, 2021 5:33 pm
Full name: Aron Rodgriges

Re: Apple M1 CPU & GPU speed is very disappointing

Post by wickedpotus »

jdart wrote: Mon Nov 29, 2021 5:10 am That page is talking about Lc0, which is dependent on GPU speed. The M1 chips have an embedded GPU, which is not particularly powerful compared to dedicated external GPUs. It is not even clear Lc0 is compiled to use the native GPU, but even it was, you need big hardware to run Lc0 efficiently, beyond what you are going to find in a laptop.
Not a true statement.. you can get many Laptops with powerful RTX 30xx GPU that will run LC0 very efficiently. And furthermore most of these laptops will not cost significantly more than an Apple laptop only equiped with an on-chip M1 GPU.
Milos
Posts: 4190
Joined: Wed Nov 25, 2009 1:47 am

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Milos »

wickedpotus wrote: Sat Dec 04, 2021 12:01 pm
jdart wrote: Mon Nov 29, 2021 5:10 am That page is talking about Lc0, which is dependent on GPU speed. The M1 chips have an embedded GPU, which is not particularly powerful compared to dedicated external GPUs. It is not even clear Lc0 is compiled to use the native GPU, but even it was, you need big hardware to run Lc0 efficiently, beyond what you are going to find in a laptop.
Not a true statement.. you can get many Laptops with powerful RTX 30xx GPU that will run LC0 very efficiently. And furthermore most of these laptops will not cost significantly more than an Apple laptop only equiped with an on-chip M1 GPU.
He probably meant "what you are going to find in Apple laptop" ;).
wickedpotus
Posts: 153
Joined: Sun May 16, 2021 5:33 pm
Full name: Aron Rodgriges

Re: Apple M1 CPU & GPU speed is very disappointing

Post by wickedpotus »

Milos wrote: Sat Dec 04, 2021 11:25 pm
wickedpotus wrote: Sat Dec 04, 2021 12:01 pm
jdart wrote: Mon Nov 29, 2021 5:10 am That page is talking about Lc0, which is dependent on GPU speed. The M1 chips have an embedded GPU, which is not particularly powerful compared to dedicated external GPUs. It is not even clear Lc0 is compiled to use the native GPU, but even it was, you need big hardware to run Lc0 efficiently, beyond what you are going to find in a laptop.
Not a true statement.. you can get many Laptops with powerful RTX 30xx GPU that will run LC0 very efficiently. And furthermore most of these laptops will not cost significantly more than an Apple laptop only equiped with an on-chip M1 GPU.
He probably meant "what you are going to find in Apple laptop" ;).
:D :) :D
Hai
Posts: 693
Joined: Sun Aug 04, 2013 1:19 pm

Re: Apple M1 CPU & GPU speed is very disappointing

Post by Hai »

Raphexon wrote: Mon Nov 29, 2021 10:03 am Can you tell us how to optimize SF specifically for the M1?

Even if you can use the neural engine, it will likely incur a huge latency hit. So useless for SF.
NEON is still shit so that won't be faster either.
Maybe movegen optimization? ARM may like mailboxes more than bitboards, there's your 2% speed increase.

If you modify SF's movegen you can always do a pull request on the official stockfish github page.
Please add the results of a SPRT test with your M1 when you post it. Thanks!
Yes NEON is shit. Only +18% speed improvement with one patch. https://abrok.eu/stockfish/
We deserve at least +180% with one patch.
I know that we have around thousands of speed patches for intel or amd cpus but that’s another story.