M1 Apple Silicon for Chess?

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

Moderator: Ras

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: M1 Apple Silicon for Chess?

Post by MikeB »

Ckappe wrote: Fri Feb 26, 2021 7:36 pm
acepoint_de wrote: Fri Feb 26, 2021 5:38 pm
Ckappe wrote: Fri Feb 26, 2021 4:29 pm Thanks, much appreciated.. So the cFish with NEON optimization performas worse than C++ clones like Maguro & BlackDiamond? Or did you test them without NNUE?
benchmark.c of cfish:

Code: Select all

109 // - Evaluation: classical, nnue (hybrid), pure (NNUE only), mixed (default).
I suggest you better ask the developers regarding such specific questions. I have no time to investigate for each Stockfish-based engine whether «default» bench is different to the others.
Also very surprising that the single core performance increase for some engines when you use two cores... :-)
These benchmarks will rarely give exact the same number, they vary up to +/-50,000 nps, and I'm surprised that you don't know this. If you want exact numbers you have to reboot the system after each run, do each run ten times and take the mean. Even longer test suites don't give exactly the same results.

Ciao

acepoint

I asked you as I cannot really ask Michael what options you used and what bench code you used etc..

For black-diamond etc. it seems NNUE=false if you don't specify that for bench... Using mixed for some, NNUE for some, classic for some doesnt make to much sens.. But I fully understand your point that doing it more seriously takes lots more time :-) And I appreciate what you have done :-)


I have done many benches of SF and never seen the two threads perf be more than twice the single core one given a good test-setup, bench.. Maybe you have very different conditions between runs? Or as stated before an extrem small sample size for the avg nps bench in bench..

I am not very impressed what Apple has accomplished with the M1.. A TDP of 39W accoriding to Apple on full load and desprite using 5nm, and 8-core design - my hopes for their more mid-range/high-end stuff coming sometime is pretty low right now.. I hope they will do better!
Benches for the Honey engines are different - one they have 96 positions, two the bench command is slightly different

bench 64 1 13 true -> will use NNUE
bench 64 1 13 false -> will use classical eval

false is the default if you don't tell it true

also the shortcut is "b"/
"b 16 1 13 true" will also run bench with NNUE enabled
type "s" to see all keyboard shortcuts

Honey, Black-Diamond., Bluefish , Harmon, Oki-Maguro all have the shortcuts/

Shortcut Commands:
Note: setoption name 'option name' value 'value'
is replaced by:
set (or 's'), 'option name' or 'option shortcut' 'value'
Note: 'set' or 's', without an 'option' entered, displays the shortcuts

Shortcuts:
'50' -> shortcut for 'Syzygy50MoveRule'
'960' -> shortcut for 'UCI_Chess960'
'd' -> shortcut for 'depth'
'dpa' -> shortcut for 'Deep_Pro_Analysis'
'g' -> shortcut for 'go'
'i' -> shortcut for 'infinite'
'm' -> shortcut for 'Mate'
'mo' -> shortcut for 'Min Output'
'mv' -> shortcut for 'MultiPV'
'mt' -> shortcut for 'Movetime'->
Note: 'mt' is in seconds, while
movetime is in milliseconds
'p f' -> shortcut for 'position fen'
'nn' -> shortcut for 'UseNN'
'proa'-> shortcut for 'Pro Analysis'
'prov'-> shortcut for 'Pro Value'
'sm' -> shortcut for 'SearchMoves'
Note: 'sm' or 'SearchMoves' MUST be the
last option on the command line!
'so' -> shortcut for 'Score Output'
't' -> shortcut for 'Threads'
'ta' -> shortcut for 'Tactical'
'q' -> shortcut for 'quit'
'z' -> shortcut for 'SyzygyPath'
'?' -> shortcut for 'stop'
Image
User avatar
Ras
Posts: 2696
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: M1 Apple Silicon for Chess?

Post by Ras »

Ckappe wrote: Sat Feb 27, 2021 12:32 amThis is more than twice the performance of the M1 Cfish build? with the same number of cores and 45W TDP CPU compared to Apple's 39W TDP CPU.
The M1 doesn't actually have the same number of cores because four of them are low-power ones meant for maximum battery life. The 4900H has no such thing so that while the number of cores matches, what's behind the numbers doesn't. Also, if you don't want a power-consuming GPU (i.e. integrated graphics alone), good luck with finding that in a 4900H. I don't think such laptops even exist.

AMD's TDP is not to be confused with actual power draw. It's a marketing number loosely defined about AMD's own "classes" of CPUs. AMD defines the TDP like this: if the ambient temperature is A, and the CPU temperature is B, and the thermal resistance between them is C, then the heat transferred is D. D is in the unit of Watts, but has nothing to do with power consumption. That's also how they get different CPUs all to e.g. 65W or 95W. They just change A, B, and C until the desired number D comes out.

For example, here's a review of Schenker's XMG 15 with 4800H: https://www.youtube.com/watch?v=7YQ2kYVdUrY. That has a TDP of 45W, but at 23:16, you can see the maximum CPU package power draw throughout the benchmarks. It's 74W (yes, for the CPU alone!), not 45W.

It's also important how the specific laptop manufacturer configures the CPU and how powerful the cooling system even is to avoid thermal throttling. Then there's the question whether it runs on AC or on battery. Many AMD laptops don't deliver full performance on battery, but drop down by about 40%. By contrast, many Intel laptops do offer full speed on battery, but only as long as it's full, and throttle down once the battery level drops to half-full. You really have to take care what and how you are benchmarking.
Rasmus Althoff
https://www.ct800.net
acepoint_de
Posts: 86
Joined: Tue Jun 11, 2013 1:14 am

Re: M1 Apple Silicon for Chess?

Post by acepoint_de »

@Ras: thanks for your technical explanation. But I think it's useless to discuss this with Ckappe, at least I stopped arguing. Regarding the hardware he is comparing apples with orange juice in the whole thread here without reflecting the responses.
Ckappe: «I am not very impressed what Apple has accomplished with the M1»
sums pretty much up what his point of view was, is and will be. So, let's have him have his opinion and the M1 owner have their fun ;-).

@Ckappe: thx for your benchmarks. Is there a certain reason that you only published the output of 16 threads but not 1, 2 and 4 (which would at least give some comparability)?

Ciao

acepoint
acepoint_de
Posts: 86
Joined: Tue Jun 11, 2013 1:14 am

Re: M1 Apple Silicon for Chess?

Post by acepoint_de »

MikeB wrote: Sat Feb 27, 2021 9:04 am Benches for the Honey engines are different - one they have 96 positions, two the bench command is slightly different

bench 64 1 13 true -> will use NNUE
bench 64 1 13 false -> will use classical eval
...
Thx for the explanation. That was well hidden ;-). So, if I got it right you can either do a classical or a nnue bench, but no mixed?

Ciao

acepoint
Ckappe
Posts: 81
Joined: Sun Feb 14, 2021 11:50 am
Full name: Rütger Andersen

Re: M1 Apple Silicon for Chess?

Post by Ckappe »

MikeB wrote: Sat Feb 27, 2021 9:04 am Benches for the Honey engines are different - one they have 96 positions, two the bench command is slightly different

bench 64 1 13 true -> will use NNUE
bench 64 1 13 false -> will use classical eval

false is the default if you don't tell it true

also the shortcut is "b"/
"b 16 1 13 true" will also run bench with NNUE enabled
type "s" to see all keyboard shortcuts

Honey, Black-Diamond., Bluefish , Harmon, Oki-Maguro all have the shortcuts/

Shortcut Commands:
Note: setoption name 'option name' value 'value'
is replaced by:
set (or 's'), 'option name' or 'option shortcut' 'value'
Note: 'set' or 's', without an 'option' entered, displays the shortcuts

Shortcuts:
'50' -> shortcut for 'Syzygy50MoveRule'
'960' -> shortcut for 'UCI_Chess960'
'd' -> shortcut for 'depth'
'dpa' -> shortcut for 'Deep_Pro_Analysis'
'g' -> shortcut for 'go'
'i' -> shortcut for 'infinite'
'm' -> shortcut for 'Mate'
'mo' -> shortcut for 'Min Output'
'mv' -> shortcut for 'MultiPV'
'mt' -> shortcut for 'Movetime'->
Note: 'mt' is in seconds, while
movetime is in milliseconds
'p f' -> shortcut for 'position fen'
'nn' -> shortcut for 'UseNN'
'proa'-> shortcut for 'Pro Analysis'
'prov'-> shortcut for 'Pro Value'
'sm' -> shortcut for 'SearchMoves'
Note: 'sm' or 'SearchMoves' MUST be the
last option on the command line!
'so' -> shortcut for 'Score Output'
't' -> shortcut for 'Threads'
'ta' -> shortcut for 'Tactical'
'q' -> shortcut for 'quit'
'z' -> shortcut for 'SyzygyPath'
'?' -> shortcut for 'stop'
Great input .. thx
Ckappe
Posts: 81
Joined: Sun Feb 14, 2021 11:50 am
Full name: Rütger Andersen

Re: M1 Apple Silicon for Chess?

Post by Ckappe »

Ras wrote: Sat Feb 27, 2021 10:39 am
Ckappe wrote: Sat Feb 27, 2021 12:32 amThis is more than twice the performance of the M1 Cfish build? with the same number of cores and 45W TDP CPU compared to Apple's 39W TDP CPU.
The M1 doesn't actually have the same number of cores because four of them are low-power ones meant for maximum battery life. The 4900H has no such thing so that while the number of cores matches, what's behind the numbers doesn't. Also, if you don't want a power-consuming GPU (i.e. integrated graphics alone), good luck with finding that in a 4900H. I don't think such laptops even exist.

AMD's TDP is not to be confused with actual power draw. It's a marketing number loosely defined about AMD's own "classes" of CPUs. AMD defines the TDP like this: if the ambient temperature is A, and the CPU temperature is B, and the thermal resistance between them is C, then the heat transferred is D. D is in the unit of Watts, but has nothing to do with power consumption. That's also how they get different CPUs all to e.g. 65W or 95W. They just change A, B, and C until the desired number D comes out.

For example, here's a review of Schenker's XMG 15 with 4800H: https://www.youtube.com/watch?v=7YQ2kYVdUrY. That has a TDP of 45W, but at 23:16, you can see the maximum CPU package power draw throughout the benchmarks. It's 74W (yes, for the CPU alone!), not 45W.

It's also important how the specific laptop manufacturer configures the CPU and how powerful the cooling system even is to avoid thermal throttling. Then there's the question whether it runs on AC or on battery. Many AMD laptops don't deliver full performance on battery, but drop down by about 40%. By contrast, many Intel laptops do offer full speed on battery, but only as long as it's full, and throttle down once the battery level drops to half-full. You really have to take care what and how you are benchmarking.
Well..the 4900H supports iGPU so I don't need to use a powerful external GPU (sadly the M1 you are stuck with the built-in poor GPU :-( ) if you only want to run CPU tasks.

The laptops shipped with 4900H beef up the battery to get good stamina, so underclocking or using only 4-cores to match M1s performance while more than doubles the battery times so in effect the Asus with 4900H gets even better run-time than the currently available M1 alternatives under similar CPU load.

Thanks for the youtube video btw. But I think you may confuse normal power draw, TDP from a vendor with what is the limits when overclocking and boosting... If you overclock stuff it will draw more power. that's not a drawback that's a feature :-) it's not like Apples locked-in systems are overclocking friendly and bios-adjusting friendly, are they ... LOL

Also, the overclockable laptop in the video (XMG OEM of Tongfang GK5NR0O) is updated with a 3060 RTX card and still 200 USD less expensive than an M1 pro with similar RAM/SSD.
User avatar
Ras
Posts: 2696
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: M1 Apple Silicon for Chess?

Post by Ras »

Ckappe wrote: Sat Feb 27, 2021 3:26 pmWell..the 4900H supports iGPU
But you will not find a laptop that has the 4900H and iGPU only - not even as advertised model, let alone in one that you could actually order right now.
The laptops shipped with 4900H beef up the battery to get good stamina
Yeah, because these are gaming laptops. They are also quite a bit bulkier and louder.
But I think you may confuse normal power draw, TDP from a vendor with what is the limits when overclocking and boosting...
Nope. The vendor TDP just doesn't mean "power draw", and I'm not referring to overclocking. Comparing energy efficiency based on TDP data is nonsense, unfortunately. TDP is not even about how powerful the cooling system has to be. Guess who is unhappy with that one? Yep, manufacturers of cooling solutions.
and still 200 USD less expensive than an M1 pro with similar RAM/SSD.
I have a 4700U laptop, pretty sleek, and I'm happy not to have paid the completely insane price that Apple charges for their prorietary flash storage because my laptop takes an M.2 2280 SSD at normal market price. Also, I can exchange the battery myself if need be because it isn't glued. And it runs Linux properly, including graphics acceleration.

However, there are a number of ways I can influence e.g. the Ipman benchmark in any direction I like, to the point that the benchmark becomes meaningless:
  • It starts out turbo'ing at 3 GHz with 8 cores loaded (no SMT in that CPU) and slowly goes down to 2 GHz, which is the advertised base clock rate. Means, the first benchmark run will be better than what you get at sustained load.
  • This was on AC, but on battery, the clock rate is only half of that so that it ends up at only 1 GHz with sustained load.
  • It depends on the power profile you set in the BIOS - maximum performance or pretty silent (the M1 Air doesn't even have a fan, and the M1 book is still pretty quiet).
  • What kind of cooling solution the laptop manufacturer has built in.
Rasmus Althoff
https://www.ct800.net
User avatar
AlexChess
Posts: 1562
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

Intel / AMD x86-64 systems are obsolete. Considered the great success of Apple Silicon, they are moving to ARM, too. Windows 10 ARM64 prerelease 21322 is already very stable and compatible with old apps. I'll never return to the old architecture. And also the graphics performances will be soon much better.

https://www.forbes.com/sites/ewanspence ... eak-rumor/
Chess engines and dedicated chess computers fan since 1981 :D macOS Sequoia 16GB-512GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: M1 Apple Silicon for Chess?

Post by Joost Buijs »

AlexChess wrote: Sat Feb 27, 2021 4:03 pm Intel / AMD x86-64 systems are obsolete. Considered the great success of Apple Silicon, they are moving to ARM, too. Windows 10 ARM64 prerelease 21322 is already very stable and compatible with old apps. I'll never return to the old architecture. And also the graphics performances will be soon much better.

https://www.forbes.com/sites/ewanspence ... eak-rumor/
You must be joking! 90% of the people will never buy Apples over-hyped and under-performing hardware.
User avatar
AlexChess
Posts: 1562
Joined: Sat Feb 06, 2021 8:06 am
Full name: Alex Morales

Re: M1 Apple Silicon for Chess?

Post by AlexChess »

I'm not speaking about Apple, but about the whole market, from consumers to professionals. All manifacturers are switching to ARM.

https://www.theverge.com/2021/1/11/2222 ... h-ces-2021
Chess engines and dedicated chess computers fan since 1981 :D macOS Sequoia 16GB-512GB, Windows 11 & Ubuntu ARM64.
ProteusSF Dev Forum