Page 5 of 7

Re: LC0 For Android!!! History Made!!

Posted: Mon May 27, 2019 10:10 pm
by abik
Laskos wrote: Sat May 25, 2019 9:58 amThanks. How many NPS you get with Lc0 after 10s from starting position? I get around 400 on 4 cores.
On a Pixel C with default 2 threads, and 48x5 weights, about 600 nps.

Re: LC0 For Android!!! History Made!!

Posted: Tue May 28, 2019 10:54 pm
by supersharp77
New Compile with weights built in.....unfortunately Arm7 compile crashed in Chess for android (engine exit)

New: There are two special test builds for those who couldn't or wouldn't fiddle with UCI Options and full paths, or maybe those using a GUI without that capability. These builds contain a small 48x5 weights file embedded into the engine itself. You'll still be able to use other weights with them, but the embedded weights will load when you didn't specify one. Get them here:

32 bits:

https://github.com/LeelaChessZero/lc0/f ... a-48x5.zip

64 bits:

https://github.com/LeelaChessZero/lc0/f ... 4-48x5.zip

Re: LC0 For Android!!! History Made!!

Posted: Tue May 28, 2019 11:58 pm
by Eduard
Great, thanks!

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 12:08 am
by abik
supersharp77 wrote: Tue May 28, 2019 10:54 pmNew: There are two special test builds for those who couldn't or wouldn't fiddle with UCI Options and full paths, or maybe those using a GUI without that capability. These builds contain a small 48x5 weights file embedded into the engine itself. You'll still be able to use other weights with them, but the embedded weights will load when you didn't specify one.
Nice to have them embedded (although for Chess for Android in particular, the new options setup is now available).
I tried both the armv7 and aarch64, and both binaries run just fine in Chess for Android, no engine exit....

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 12:17 am
by lealgo
supersharp77 wrote: Tue May 28, 2019 10:54 pm .....unfortunately Arm7 compile crashed in Chess for android (engine exit)
Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:
The current builds are compiled using the latest Android NDK targeting the API Level 28 (equivalent to Android 9 Pie). But they're tested and run on Android 8 & 9. So older Android versions may not work. The plan is to build them for API Level 21 (Android 5.0 Lollipop and up) so they support a wider range of devices.
Also, could you try this build:

https://github.com/LeelaChessZero/lc0/f ... roid24.zip

Regards,
Leandro

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 1:14 am
by Aleksei
lealgo wrote: Wed May 29, 2019 12:17 am Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:

Regards,
Leandro
Hi Leandro! The problem is not with the weights, but with the engine. For arm7 engines, the API level should be lowered to API 16! I always use api 16 for arm7 engines, and they all working fine. Eg for arm7 & arm8 (using NDK's toolchain).

Code: Select all

rem make_standalone_toolchain.py --arch arm --api 16 --install-dir d:\android-standalone-32
rem make_standalone_toolchain.py --arch arm64 --api 24 --install-dir d:\android-standalone-64
Here is small video, example from my 32 bit arm7 device where you can see that engine exits. http://s000.tinyupload.com/index.php?fi ... 6715416598
My device
Image

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 1:33 am
by lealgo
Aleksei wrote: Wed May 29, 2019 1:14 am Hi Leandro! The problem is not with the weights, but with the engine. For arm7 engines, the API level should be lowered to API 16! I always use api 16 for arm7 engines, and they all working fine. Eg for arm7 & arm8 (using NDK's toolchain).
Hi Aleksei,

I'll try lowering the API level. I might also try using an older NDK, as the latest one appears to have issues when targeting lower API levels.
Did you try loading the engine with DroidFish too?
Thank you for your report & hints.

Regards,
Leandro

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 1:39 am
by supersharp77
lealgo wrote: Wed May 29, 2019 12:17 am
supersharp77 wrote: Tue May 28, 2019 10:54 pm .....unfortunately Arm7 compile crashed in Chess for android (engine exit)
Hi,

May I ask which Android version you're running on that device? I've added a note on the wiki about the current builds:
The current builds are compiled using the latest Android NDK targeting the API Level 28 (equivalent to Android 9 Pie). But they're tested and run on Android 8 & 9. So older Android versions may not work. The plan is to build them for API Level 21 (Android 5.0 Lollipop and up) so they support a wider range of devices.
Also, could you try this build:

https://github.com/LeelaChessZero/lc0/f ... roid24.zip

Regards,
Leandro
Here are my tablet specs.... :) :wink:
Huawei Tablet BG2 Marshmallow 6.0 SDK 23 ART2.1.0 4cores armeabi-v7a,armeabi kernel v 3.18.22+
598 mhz-1300 mhz

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 6:58 am
by Aleksei
lealgo wrote: Wed May 29, 2019 1:33 am Hi Aleksei,

I'll try lowering the API level. I might also try using an older NDK, as the latest one appears to have issues when targeting lower API levels.
Did you try loading the engine with DroidFish too?
Hi Leandro!

NDK r19 stable version is working fine, i've tried r20 beta versions they working too, but the engines become little bit slower (which is weird).. Regarding Droidfish - same story, engine not working at all.

Re: LC0 For Android!!! History Made!!

Posted: Wed May 29, 2019 11:25 am
by WinPooh
It would be really nice to have something like go playing Leela: https://play.google.com/store/apps/deta ... android.aq
When you install application from the Market and it just works - all work with weights being handled in internal dialogs/settings of the program.