Stockfish for Android
Moderators: Elijah, Igbo, timetraveller
-
- Forum Contributions
- Points: 42 582,00
- Posts: 2059
- Joined: 04/11/2019, 21:13
- Status: Offline (Active 3 Hours, 21 Minutes ago)
- Medals: 2
- Topics: 158
- Reputation: 7111
- Been thanked: 6477 times
Stockfish for Android
I must have mixed something up. The patch was taken into account right from the start (I never had to take anything into account when compiling).
In any case, the CECSA script now also supports dot product compilation (executables only runs on newer devices). I will upload the script soon. Everything has a deeper meaning.
In any case, the CECSA script now also supports dot product compilation (executables only runs on newer devices). I will upload the script soon. Everything has a deeper meaning.
-
- Forum Contributions
- Points: 14 078,00
- Posts: 327
- Joined: 17/10/2020, 22:28
- Status: Offline (Active 1 Day, 15 Hours, 29 Minutes ago)
- Medals: 2
- Topics: 5
- Reputation: 506
- Has thanked: 349 times
- Been thanked: 671 times
Stockfish for Android
pgo-compiled armv8-dotprod prerelessed binaries of newest Stockfish17dev can always be downloaded here:
https://github.com/official-stockfish/Stockfish/releases
It would be nice if someone with an appropriate Android device could post some speed test results or at least post the name of the Android(!)-device which is able to run these dotprod-binaries.
https://github.com/official-stockfish/Stockfish/releases
It would be nice if someone with an appropriate Android device could post some speed test results or at least post the name of the Android(!)-device which is able to run these dotprod-binaries.
-
- Forum Contributions
- Points: 11 599,00
- Posts: 314
- Joined: 15/11/2019, 19:53
- Status: Offline (Active 7 Hours, 19 Minutes ago)
- Medals: 1
- Topics: 5
- Reputation: 1036
- Location: French Polynesia
- Has thanked: 1121 times
- Been thanked: 968 times
Stockfish for Android
Thank you LittleJoe. I prefer Archimedes compiles because they are not with embedded net.LittleJoe wrote: ↑12/11/2023, 17:34 pgo-compiled armv8-dotprod prerelessed binaries of newest Stockfish17dev can always be downloaded here:
https://github.com/official-stockfish/Stockfish/releases
It would be nice if someone with an appropriate Android device could post some speed test results or at least post the name of the Android(!)-device which is able to run these dotprod-binaries.
-
- Forum Contributions
- Points: 14 078,00
- Posts: 327
- Joined: 17/10/2020, 22:28
- Status: Offline (Active 1 Day, 15 Hours, 29 Minutes ago)
- Medals: 2
- Topics: 5
- Reputation: 506
- Has thanked: 349 times
- Been thanked: 671 times
Stockfish for Android
Ah yes I forgot that they only have embedded builds, I also don't like them.
Anyway, some information about Android devices which support dot-product builds would be appreciated.
Anyway, some information about Android devices which support dot-product builds would be appreciated.
-
- Forum Contributions
- Points: 42 582,00
- Posts: 2059
- Joined: 04/11/2019, 21:13
- Status: Offline (Active 3 Hours, 21 Minutes ago)
- Medals: 2
- Topics: 158
- Reputation: 7111
- Been thanked: 6477 times
Stockfish for Android
In the meantime, the clang compiler is probably the better choice. If you want to use the makefile from the CECSA script to manually compile Stockfish under Termux, you only need to enter the following command sequence after copying the makefile into the src directory:
Code: Select all
make net
make profile-build COMP=clang
-
- Forum Contributions
- Points: 19 012,00
- Posts: 217
- Joined: 02/10/2020, 10:27
- Status: Offline (Active 1 Day, 9 Hours, 26 Minutes ago)
- Medals: 1
- Topics: 0
- Reputation: 671
- Has thanked: 182 times
- Been thanked: 1164 times
-
- Forum Contributions
- Points: 14 010,00
- Posts: 76
- Joined: 24/02/2022, 11:23
- Status: Offline (Active 1 Week, 2 Days, 17 Hours, 41 Minutes ago)
- Topics: 0
- Reputation: 17
- Has thanked: 1 time
- Been thanked: 51 times
Stockfish for Android
orArchimedes wrote: ↑13/11/2023, 8:56 In the meantime, the clang compiler is probably the better choice. If you want to use the makefile from the CECSA script to manually compile Stockfish under Termux, you only need to enter the following command sequence after copying the makefile into the src directory:Code: Select all
make net make profile-build COMP=clang
Code: Select all
make profile-build ARCH=armv8-dotprod COMP=clang COMPCXX=clang++
-
- Forum Contributions
- Points: 14 010,00
- Posts: 76
- Joined: 24/02/2022, 11:23
- Status: Offline (Active 1 Week, 2 Days, 17 Hours, 41 Minutes ago)
- Topics: 0
- Reputation: 17
- Has thanked: 1 time
- Been thanked: 51 times
-
- Forum Contributions
- Points: 19 012,00
- Posts: 217
- Joined: 02/10/2020, 10:27
- Status: Offline (Active 1 Day, 9 Hours, 26 Minutes ago)
- Medals: 1
- Topics: 0
- Reputation: 671
- Has thanked: 182 times
- Been thanked: 1164 times
-
- Forum Contributions
- Points: 42 582,00
- Posts: 2059
- Joined: 04/11/2019, 21:13
- Status: Offline (Active 3 Hours, 21 Minutes ago)
- Medals: 2
- Topics: 158
- Reputation: 7111
- Been thanked: 6477 times
Stockfish for Android
LittleJoe drew my attention to a repository that has been around for a while.
https://github.com/termux-user-repository/tur
In this repository you can find the latest GCC compilers (latest version is 13.2.0).
After installing the repository, you only need
and
Termux may need to be restarted before the last command.
Compared to the latest version of Clang (17.0.6), this provides a significant speed boost of around 5.4% for the PGO compiles. And that's a lot. As I found out, the outputs seem to be compatible with API level 23 (Android 6). If someone tells me how I can set an API level of 21, then I'll do it.
I have just uploaded the latest versions of Stockfish again and also updated the installation script cecsa.sh accordingly.
LittleJoe, thanks again for the tip.
https://github.com/termux-user-repository/tur
In this repository you can find the latest GCC compilers (latest version is 13.2.0).
After installing the repository, you only need
Code: Select all
pkg install gcc-13
Code: Select all
pkg install gcc-default-13
Compared to the latest version of Clang (17.0.6), this provides a significant speed boost of around 5.4% for the PGO compiles. And that's a lot. As I found out, the outputs seem to be compatible with API level 23 (Android 6). If someone tells me how I can set an API level of 21, then I'll do it.
I have just uploaded the latest versions of Stockfish again and also updated the installation script cecsa.sh accordingly.
LittleJoe, thanks again for the tip.
-
- Forum Contributions
- Points: 42 582,00
- Posts: 2059
- Joined: 04/11/2019, 21:13
- Status: Offline (Active 3 Hours, 21 Minutes ago)
- Medals: 2
- Topics: 158
- Reputation: 7111
- Been thanked: 6477 times
Stockfish for Android
The latest GCC version of Stockfish is therefore around 7.8 % faster than the official Stockfish version (compiled with Clang 9.0.9).
-
- Forum Contributions
- Points: 14 078,00
- Posts: 327
- Joined: 17/10/2020, 22:28
- Status: Offline (Active 1 Day, 15 Hours, 29 Minutes ago)
- Medals: 2
- Topics: 5
- Reputation: 506
- Has thanked: 349 times
- Been thanked: 671 times
Stockfish for Android
That's about 15 Elo which is a lot in these high Elo regions. But the SFdevs don't care much about Android and they certainly can't compile each Android dev-build manually with Termux on an Android device, which gives by far the builds with the best nps-values. So they have to use for their GitHub-Actions workflows a very old NDK (which obviously uses clang 9). Newer NDKs don't support anymore the NDK-toolchains (which were never officially supported by Google).Archimedes wrote: ↑11/12/2023, 23:11 The latest GCC version of Stockfish is therefore around 7.8 % faster than the official Stockfish version (compiled with Clang 9.0.9).
-
- Forum Contributions
- Points: 19 012,00
- Posts: 217
- Joined: 02/10/2020, 10:27
- Status: Offline (Active 1 Day, 9 Hours, 26 Minutes ago)
- Medals: 1
- Topics: 0
- Reputation: 671
- Has thanked: 182 times
- Been thanked: 1164 times
Stockfish for Android
Hello dear Archimedes.Happy new year full of blessings.Can you please compile latest SF 01012024 for Android?
-
- Forum Contributions
- Points: 11 741,00
- Posts: 70
- Joined: 16/03/2022, 13:56
- Status: Offline (Active 3 Days, 23 Hours, 47 Minutes ago)
- Topics: 6
- Reputation: 42
- Has thanked: 38 times
- Been thanked: 86 times
Small nets rule!
I'm coming to the conclusion that the large Stockfish nets - at least on Android phones - are no longer of any value.
This week I downloaded the latest Stockfish with its default net, as compiled by Archimedes (nn-b1e55edbea57.nnue, 64mb). Then I tested it against the latest small net to be found on Joachim's Stockfish NPS page (nn-9067e33176e8.nnue, 6.62 mb). The link for this is at the end of this post.
Both nets are from December, so are roughly equal in terms of ongoing development. The match was 100 games at 1 sec/move. I put together an opening suite of various randomised 4-ply, 6-ply and 8-ply openings, and threw in a dozen gambit lines as well to get as much variety as possible.
The results are clearly in favour of the smaller net, which won with 38 wins, 12 losses and 50 draws. In other words, a more than 3:1 win/loss ratio.
What we see here is a fascinating clash between more knowledge (in the form of a very large net) and faster speed. My conclusion is that faster speed often gives the biggest advantage. The small net, which is almost one-tenth the size of the large one, averaged 6-7 times more nodes per second, and this made all the difference.
So I hope there is more development of such small nets because they provide the best performance on a phone, without any doubt. The 9067 net is now the default net on my phone.
https://github.com/Joachim26/StockfishNPS/releases/tag/Win_modern_and_armv8_dev_release
This week I downloaded the latest Stockfish with its default net, as compiled by Archimedes (nn-b1e55edbea57.nnue, 64mb). Then I tested it against the latest small net to be found on Joachim's Stockfish NPS page (nn-9067e33176e8.nnue, 6.62 mb). The link for this is at the end of this post.
Both nets are from December, so are roughly equal in terms of ongoing development. The match was 100 games at 1 sec/move. I put together an opening suite of various randomised 4-ply, 6-ply and 8-ply openings, and threw in a dozen gambit lines as well to get as much variety as possible.
The results are clearly in favour of the smaller net, which won with 38 wins, 12 losses and 50 draws. In other words, a more than 3:1 win/loss ratio.
What we see here is a fascinating clash between more knowledge (in the form of a very large net) and faster speed. My conclusion is that faster speed often gives the biggest advantage. The small net, which is almost one-tenth the size of the large one, averaged 6-7 times more nodes per second, and this made all the difference.
So I hope there is more development of such small nets because they provide the best performance on a phone, without any doubt. The 9067 net is now the default net on my phone.
https://github.com/Joachim26/StockfishNPS/releases/tag/Win_modern_and_armv8_dev_release
Last edited by Lotus340 on 02/01/2024, 13:39, edited 2 times in total.
-
- Forum Contributions
- Points: 19 012,00
- Posts: 217
- Joined: 02/10/2020, 10:27
- Status: Offline (Active 1 Day, 9 Hours, 26 Minutes ago)
- Medals: 1
- Topics: 0
- Reputation: 671
- Has thanked: 182 times
- Been thanked: 1164 times
Stockfish for Android
Wow + 92 elo!! At LTC probably bigger net will take over...But at VVSTC makes sense.If that is the case why SF use dual net in future?