lantonov / asmFish

A continuation of the nice project asmFish by Mohammed Li. Latest version: 07.08.2019
https://lantonov.github.io/asmFish/
Other
118 stars 49 forks source link

armFish is not ready yet #57

Closed tthsqe12 closed 7 years ago

tthsqe12 commented 7 years ago

It will take some time to get armFish working. The current status of armFish is:

lantonov commented 7 years ago

Can an executable be made for testing by people with ARM machines (sterten) or it is not yet at this stage?

tthsqe12 commented 7 years ago

an executable can be made. However, the 'go' command does not work. The only command that you can count on working is perft. So after start up, you should be able to issue 'perft 6' for example. Also, I've only got it working for the linux kernel. So, you would have to test it on a device running linux.

tthsqe12 commented 7 years ago

If you are assembling on an x86 linux box, you can use the cross compiler provided by gnu. See http://thinkingeek.com/2016/10/08/exploring-aarch64-assembler-chapter1/ However, the gnuisance assembler is not like fasm. Building is a two step process. First, the .arm file with the assembly in it is assembled to a .o file. Then you use the linker to make an actual executable.

lantonov commented 7 years ago

I have a Windows 10 OS on which I have installed Linux Bash for Windows with plain gcc (as and ld). I have to install the aarch64 assembler. You have given the necessary commands at the beginning of armFish.arm file. Have to install also the qemu to run it.

tthsqe12 commented 7 years ago

screenshot oh that is going to be fun - you are going to be running two layers of emulation. Let me know how it works. You can see the output from the program in the upper left.

lantonov commented 7 years ago
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ aarch64-linux-gnu-as -c armFish.arm -o armFish.o
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ ls
armFish.arm  armFish.o  guts  ReadMe.txt
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ aarch64-linux-gnu-ld -static -o armFish armFish.o
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ ls
armFish  armFish.arm  armFish.o  guts  ReadMe.txt
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
  mmap(size = 0000000000080000):       0000004000801000
munmap(size = 0000000000080000, addr = 0000004000801000): 0000000000000000
SeeSignBitMask: 7c00406070787c7c
test: 000000000000000e 246027f3b0de3fee 000000000000000f 4154914a0bd574d5
pow(2.000, 2.500): 5.656
pow(2.000, -2.500): 0.176
log(30.000): 3.401
exp(3.000): 20.085
scalbn(3.500, -2): 0.875
armFish
  mmap(size = 0000000001000000):       0000004000881000
  mmap(size = 0000000000000398):       0000004001881000
  mmap(size = 0000000000010e00):       0000004001882000
  mmap(size = 0000000000009000):       0000004001893000
  mmap(size = 0000000000140000):       000000400189c000
  mmap(size = 0000000000020000):       00000040019dc000
  mmap(size = 0000000000018000):       00000040019fc000
  mmap(size = 0000000000400000):       0000004001a14000
sys_mmap in Os_VirtualAlloc failed x0: 0xffffffffffffffa1

I have the executable but it gives errors in Linux Bash for Windows. I suspect that it is correct, though, because the asmFish compiled with fasm.exe for Linux also gives similar errors when trying to run in Linux Bash for Windows. I will upload this file in the executables branch to try. armFish is 213 kb and armFish.o is 247 kb.

tthsqe12 commented 7 years ago

0xffa1 is -95 in decimal which is

define EOPNOTSUPP 95 / Operation not supported on transport endpoint /

Are you saying that both the x86 and arm version both give this error? This is the point where the search thread is created. Maybe some of the flags in the syscalls are incorrect

lantonov commented 7 years ago

With Linux versions of asmFish that work on true Linux boxes, I get the following:

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/Linux$ ./asmFishL_2017-05-22_base
asmFishL_2017-05-22_base
sys_mmap failed rax: 0xffffffffffffffa1
tthsqe12 commented 7 years ago

I will not be able to try this because I do not have windows 10. If you want to play with this, you can try changing the arguments of the syscall. You will need to possibly change lines 558, 567-571 of OsLinux.asm. See https://filippo.io/linux-syscall-table/ for details. You should also set VERBOSE equ 1 to see more of what is going on.

lantonov commented 7 years ago

I uploaded the assembled file in executables ARM directory. Can you run it in your ARM emulator?

tthsqe12 commented 7 years ago

Your executable runs on my emulator on my ubuntu installation.


armFish  armFish_2017-05-23  armFish.arm  armFish.o  guts  ReadMe.txt
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ chmod 755 ./armFish_2017-05-23 
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ ./armFish_2017-05-23 
./armFish_2017-05-23: line 7: syntax error near unexpected token `newline'
./armFish_2017-05-23: line 7: `<!DOCTYPE html>'
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ qemu-aarch64 ./armFish_2017-05-23 
Error while loading ./armFish_2017-05-23: Exec format error
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ file ./armFish_2017-05-23 ./armFish_2017-05-23: HTML document, UTF-8 Unicode text, with very long lines
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ chmod 755 ./armFish_2017-05-23 
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ qemu-aarch64 ./armFish_2017-05-23 
  mmap(size = 0000000000080000):       0000004000801000
munmap(size = 0000000000080000, addr = 0000004000801000): 0000000000000000
SeeSignBitMask: 7c00406070787c7c
test: 000000000000000e 246027f3b0de3fee 000000000000000f 4154914a0bd574d5
pow(2.000, 2.500): 5.656
pow(2.000, -2.500): 0.176
log(30.000): 3.401
exp(3.000): 20.085
scalbn(3.500, -2): 0.875
armFish
  mmap(size = 0000000001000000):       0000004000881000
  mmap(size = 0000000000000398):       0000004001881000
  mmap(size = 0000000000010e00):       0000004001882000
  mmap(size = 0000000000009000):       0000004001893000
  mmap(size = 0000000000140000):       000000400189c000
  mmap(size = 0000000000020000):       00000040019dc000
  mmap(size = 0000000000018000):       00000040019fc000
  mmap(size = 0000000000400000):       0000004001a14000
hello from thread 0000004001881000
  mmap(size = 0000000000001000):       0000004001f14000
  mmap(size = 0000000000004400):       0000004001f15000
perft 4
a2a3 :  8457
b2b3 :  9345
c2c3 :  9272
d2d3 :  11959
e2e3 :  13134
f2f3 :  8457
g2g3 :  9345
h2h3 :  8457
a2a4 :  9329
b2b4 :  9332
c2c4 :  9744
d2d4 :  12435
e2e4 :  13160
f2f4 :  8929
g2g4 :  9328
h2h4 :  9329
b1a3 :  8885
b1c3 :  9755
g1f3 :  9748
g1h3 :  8881
===========================
Total time (ms) : 14
Nodes searched  : 197281
Nodes/second    : 14091500
quit
munmap(size = 0000000000004400, addr = 0000004001f15000): 0000000000000000
hello from thread 0000004001881000
hello from thread 0000004001881000
goodbye from thread 0000004001881000
munmap(size = 0000000000100000, addr = 0000004001e14000): 0000000000000000
munmap(size = 0000000000018000, addr = 00000040019fc000): 0000000000000000
munmap(size = 0000000000020000, addr = 00000040019dc000): 0000000000000000
munmap(size = 0000000000140000, addr = 000000400189c000): 0000000000000000
munmap(size = 0000000000009000, addr = 0000004001893000): 0000000000000000
munmap(size = 0000000000010e00, addr = 0000004000000000): 0000000000000000
munmap(size = 0000000000000398, addr = 0000004001881000): 0000000000000000
munmap(size = 0000000000400000, addr = 0000004001a14000): 0000000000000000
munmap(size = 0000000001000000, addr = 0000004000881000): 0000000000000000
munmap(size = 0000000000001000, addr = 0000004001f14000): 0000000000000000
pc@pc-500-210qe:~/Desktop/asmFish-master/armFish$ 
lantonov commented 7 years ago

You get similar output before the error line. I will play with Linux Bash and OsLinux.asm to see if I can start it on Windows.

tthsqe12 commented 7 years ago

could you try removing the MAP_GROWSDOWN flag from this line https://github.com/lantonov/asmFish/blob/master/asmFish/guts/OsLinux.asm#L501 and then give it a try on bash on ubuntu on windows

lantonov commented 7 years ago

I will give it a try, thanks. UPDATE: You are a magician. Works perfectly without this flag

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/Linux$ ./asmFishL_2017-05-24_base
asmFishL_2017-05-24_base
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes:  277018          1530 knps
2:      nodes:  482402          1618 knps
3:      nodes:  114991          2499 knps
4:      nodes:  196713          1625 knps
5:      nodes:  63877           1557 knps
6:      nodes:  263892          1418 knps
7:      nodes:  346813          1463 knps
8:      nodes:  505265          1667 knps
9:      nodes:  241220          1453 knps
10:     nodes:  151622          1684 knps
11:     nodes:  296773          1476 knps
12:     nodes:  405241          1426 knps
13:     nodes:  175110          1522 knps
14:     nodes:  170049          1478 knps
15:     nodes:  150035          1667 knps
16:     nodes:  69170           1921 knps
17:     nodes:  83857           2150 knps
18:     nodes:  33542           2395 knps
19:     nodes:  58975           2457 knps
20:     nodes:  524256          2484 knps
21:     nodes:  60619           2755 knps
22:     nodes:  55590           3474 knps
23:     nodes:  106803          3236 knps
24:     nodes:  64937           2319 knps
25:     nodes:  9369            2342 knps
26:     nodes:  70579           2205 knps
27:     nodes:  404427          2063 knps
28:     nodes:  203255          1847 knps
29:     nodes:  82481           1918 knps
30:     nodes:  20892           2611 knps
31:     nodes:  64482           3070 knps
32:     nodes:  102117          3003 knps
33:     nodes:  67529           3376 knps
34:     nodes:  83587           2696 knps
35:     nodes:  98418           2523 knps
36:     nodes:  110065          3550 knps
37:     nodes:  254018          2442 knps
===========================
Total time (ms) : 3570
Nodes searched  : 6469989
Nodes/second    : 1812321

with bmi2

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/Linux$ ./asmFishL_2017-05-24_bmi2
asmFishL_2017-05-24_bmi2
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes:  277018          1601 knps
2:      nodes:  482402          1780 knps
3:      nodes:  114991          2446 knps
4:      nodes:  196713          1804 knps
5:      nodes:  63877           1726 knps
6:      nodes:  263892          1516 knps
7:      nodes:  346813          1590 knps
8:      nodes:  505265          1760 knps
9:      nodes:  241220          1526 knps
10:     nodes:  151622          1826 knps
11:     nodes:  296773          1553 knps
12:     nodes:  405241          1523 knps
13:     nodes:  175110          1667 knps
14:     nodes:  170049          1574 knps
15:     nodes:  150035          1875 knps
16:     nodes:  69170           1976 knps
17:     nodes:  83857           2266 knps
18:     nodes:  33542           2236 knps
19:     nodes:  58975           2680 knps
20:     nodes:  524256          2544 knps
21:     nodes:  60619           2635 knps
22:     nodes:  55590           3474 knps
23:     nodes:  106803          3445 knps
24:     nodes:  64937           2319 knps
25:     nodes:  9369            2342 knps
26:     nodes:  70579           2433 knps
27:     nodes:  404427          2197 knps
28:     nodes:  203255          1935 knps
29:     nodes:  82481           2062 knps
30:     nodes:  20892           2611 knps
31:     nodes:  64482           3224 knps
32:     nodes:  102117          3094 knps
33:     nodes:  67529           3376 knps
34:     nodes:  83587           2458 knps
35:     nodes:  98418           2659 knps
36:     nodes:  110065          3668 knps
37:     nodes:  254018          2442 knps
===========================
Total time (ms) : 3368
Nodes searched  : 6469989
Nodes/second    : 1921018
lantonov commented 7 years ago

Trying the same with armFish (line 322)

tthsqe12 commented 7 years ago

Good. I guess we shouldn't even be using MAP_GROWSDOWN in the first place https://lwn.net/Articles/294001/ I guess the windows people just ASSumed that no one would be using it anymore.

lantonov commented 7 years ago

armFish works perfectly on bash on ubuntu for windows without this flag

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
  mmap(size = 0000000000080000):       0000004000801000
munmap(size = 0000000000080000, addr = 0000004000801000): 0000000000000000
SeeSignBitMask: 7c00406070787c7c
test: 000000000000000e 246027f3b0de3fee 000000000000000f 4154914a0bd574d5
pow(2.000, 2.500): 5.656
pow(2.000, -2.500): 0.176
log(30.000): 3.401
exp(3.000): 20.085
scalbn(3.500, -2): 0.875
armFish
  mmap(size = 0000000001000000):       0000004000881000
  mmap(size = 0000000000000398):       0000004001881000
  mmap(size = 0000000000010e00):       0000004001882000
  mmap(size = 0000000000009000):       0000004001893000
  mmap(size = 0000000000140000):       000000400189c000
  mmap(size = 0000000000020000):       00000040019dc000
  mmap(size = 0000000000018000):       00000040019fc000
  mmap(size = 0000000000400000):       0000004001a14000
hello from thread 0000004001881000
  mmap(size = 0000000000001000):       0000004001f14000
  mmap(size = 0000000000004400):       0000004001f15000
perft 5
a2a3 :  181046
b2b3 :  215255
c2c3 :  222861
d2d3 :  328511
e2e3 :  402988
f2f3 :  178889
g2g3 :  217210
h2h3 :  181044
a2a4 :  217832
b2b4 :  216145
c2c4 :  240082
d2d4 :  361790
e2e4 :  405385
f2f4 :  198473
g2g4 :  214048
h2h4 :  218829
b1a3 :  198572
b1c3 :  234656
g1f3 :  233491
g1h3 :  198502
===========================
Total time (ms) : 263
Nodes searched  : 4865609
Nodes/second    : 18500414
lantonov commented 7 years ago

The new armFish of 25.05.2017

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
armFish
perft 5
a2a3 :  181046
b2b3 :  215255
c2c3 :  222861
d2d3 :  328511
e2e3 :  402988
f2f3 :  178889
g2g3 :  217210
h2h3 :  181044
a2a4 :  217832
b2b4 :  216145
c2c4 :  240082
d2d4 :  361790
e2e4 :  405385
f2f4 :  198473
g2g4 :  214048
h2h4 :  218829
b1a3 :  198572
b1c3 :  234656
g1f3 :  233491
g1h3 :  198502
===========================
Total time (ms) : 247
Nodes searched  : 4865609
Nodes/second    : 19698821
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
info string hash set to 16 MB no large pages
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault (core dumped)
lantonov commented 7 years ago

armFish 2017-05-29 i5-4210U 1.70 GHz 8 GB RAM 4 threads HT Bash on Ubuntu on Windows 64 bit

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
bench depth 5
*** bench hash 16 threads 1 depth 5 realtime 0 ***
1:  nodes: 2554, 0 knps
2:  nodes: 7271, 0 knps
3:  nodes: 3653, 0 knps
4:  nodes: 2611, 0 knps
5:  nodes: 2697, 0 knps
6:  nodes: 1957, 0 knps
7:  nodes: 1095, 0 knps
8:  nodes: 4023, 0 knps
9:  nodes: 982, 0 knps
10:  nodes: 1677, 0 knps
11:  nodes: 2603, 0 knps
12:  nodes: 520, 0 knps
13:  nodes: 516, 0 knps
14:  nodes: 978, 0 knps
15:  nodes: 1174, 0 knps
16:  nodes: 1415, 0 knps
17:  nodes: 928, 0 knps
18:  nodes: 365, 0 knps
19:  nodes: 3002, 0 knps
20:  nodes: 2493, 0 knps
21:  nodes: 1044, 0 knps
22:  nodes: 1714, 0 knps
23:  nodes: 2247, 0 knps
24:  nodes: 703, 0 knps
25:  nodes: 508, 0 knps
26:  nodes: 2808, 0 knps
27:  nodes: 1657, 0 knps
28:  nodes: 2055, 0 knps
29:  nodes: 2159, 0 knps
30:  nodes: 710, 0 knps
31:  nodes: 769, 0 knps
32:  nodes: 1288, 0 knps
33:  nodes: 443, 0 knps
34:  nodes: 1536, 0 knps
35:  nodes: 998, 0 knps
36:  nodes: 1175, 0 knps
37:  nodes: 1170, 0 knps
===========================
Total time (ms) : 65498
Nodes searched  : 11621
Nodes/second    : 5636
lantonov commented 7 years ago

Big speed increase with the bug-fixed armFish 2017-05-30

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
bench depth 5
*** bench hash 16 threads 1 depth 5 realtime 0 ***
1:  nodes: 2554, 106 knps
2:  nodes: 7271, 269 knps
3:  nodes: 3663, 183 knps
4:  nodes: 2611, 163 knps
5:  nodes: 2697, 168 knps
6:  nodes: 1957, 122 knps
7:  nodes: 1095, 84 knps
8:  nodes: 4023, 223 knps
9:  nodes: 982, 75 knps
10:  nodes: 1677, 119 knps
11:  nodes: 2603, 162 knps
12:  nodes: 520, 47 knps
13:  nodes: 516, 46 knps
14:  nodes: 978, 81 knps
15:  nodes: 1174, 90 knps
16:  nodes: 1415, 101 knps
17:  nodes: 912, 76 knps
18:  nodes: 365, 36 knps
19:  nodes: 2992, 187 knps
20:  nodes: 2493, 178 knps
21:  nodes: 1044, 87 knps
22:  nodes: 2283, 142 knps
23:  nodes: 2250, 173 knps
24:  nodes: 703, 63 knps
25:  nodes: 508, 50 knps
26:  nodes: 2884, 192 knps
27:  nodes: 1004, 83 knps
28:  nodes: 1968, 131 knps
29:  nodes: 1738, 124 knps
30:  nodes: 626, 56 knps
31:  nodes: 716, 71 knps
32:  nodes: 1827, 140 knps
33:  nodes: 1084, 83 knps
34:  nodes: 4022, 223 knps
35:  nodes: 1359, 113 knps
36:  nodes: 580, 52 knps
37:  nodes: 842, 76 knps
===========================
Total time (ms) : 523
Nodes searched  : 67936
Nodes/second    : 129896
tthsqe12 commented 7 years ago

evaluation is translated and the endgame evaluation functions (about 1/4 of the endgame code) is also translated. Once the endgame scaling functions are written, the benches should match, but these scaling functions hid some bugs that lied dormant in the x86 version for a long time. Fingers crossed for arm version. The actual arm code is of poor quality at the instruction level since I want to minimize the chances for bugs by writing the arm code in a "x86 emulation" fashion. Once the arm code is complete and correct, I will pick all of the very low hanging fruit left by the translation process and you will see nps go up. For now, one cannot trust the relative performance of two versions on a emulator to match the relative performance on actual superscalar arm hardware, hence it is not my intention to make it fast yet. As a bonus of translating, I have noticed some strange places in the x86 code that should be cleaned up.

lantonov commented 7 years ago

Thanks @tthsqe12, The last patch "Add files via upload" contained only a few lines added not whole files. Is this correct? After I merged the patch, git protested that I have unmerged files (the matefish*.asm's) so I had to force-push them. These 2 patches came after your merged patch. If you have problems with pulling them in your repository, call back and we will see how to proceed.

tthsqe12 commented 7 years ago

I only changed files in the armfish directory, and yes most of the changes were in evaluate.arm. I meant to upload them to my fork, but I got confused using the browser-based interface. Whatever you did will be fine. Do you have any nps figures on real arm hardware?

tthsqe12 commented 7 years ago

wait, it looks like your repo does not have the latest changes to evaluate, and that i made a mistake using the browser uploader. There were supposed to be major changes to evaluate.arm and endgame.arm. Is it possible to sync a fork using the browser interface? I will wait until im back to my linux box with cli and post the major changes there.

lantonov commented 7 years ago

Just put the latest changes in your repo like you always do, either with the browser or from cli. I shall pull and merge them in my repo. There will be a loop over the latest 2 commits in my repo (because I shan't rebase) but it doesn't matter. You will then be able to sync your repo normally with all changes. I don't have a real arm hardware but shall ask sterten to try it on strawberry pi when ready. P.S. ATM your repo is 2 commits behind mine. It would be a bit cleaner if you first sync your repo (git pull upstream master) and then commit the latest changes.

tthsqe12 commented 7 years ago

I have also uploaded several of the nnet functions and some memory management functions. These are not used at all; I just don't want to lose the code. As for arm, you should be able to assemble and link as usual then ./armFish bench should give 6121121.

lantonov commented 7 years ago

Thanks @tthsqe12, They are already in main repo and looking at them. Thanks especially for the nnet, it is a nice present. I will assemble and bench armFish in a moment.

lantonov commented 7 years ago
lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes: 247219           291 knps
2:      nodes: 366996           319 knps
3:      nodes: 141469           431 knps
4:      nodes: 162843           327 knps
5:      nodes: 80871            298 knps
6:      nodes: 324538           275 knps
7:      nodes: 276791           285 knps
8:      nodes: 495065           324 knps
9:      nodes: 346362           290 knps
10:     nodes: 137145           308 knps
11:     nodes: 174719           289 knps
12:     nodes: 446787           297 knps
13:     nodes: 115483           308 knps
14:     nodes: 83739            286 knps
15:     nodes: 92953            318 knps
16:     nodes: 70076            340 knps
17:     nodes: 75701            353 knps
18:     nodes: 26929            374 knps
19:     nodes: 57147            429 knps
20:     nodes: 390945           422 knps
21:     nodes: 105490           443 knps
22:     nodes: 44350            561 knps
23:     nodes: 91103            587 knps
24:     nodes: 69295            412 knps
25:     nodes: 9628             267 knps
26:     nodes: 54172            384 knps
27:     nodes: 267427           380 knps
28:     nodes: 422443           344 knps
29:     nodes: 104879           337 knps
30:     nodes: 37370            389 knps
31:     nodes: 57701            493 knps
32:     nodes: 81542            463 knps
33:     nodes: 66794            506 knps
34:     nodes: 78469            419 knps
35:     nodes: 97760            426 knps
36:     nodes: 192036           571 knps
37:     nodes: 226884           378 knps
===========================
Total time (ms) : 17946
Nodes searched  : 6121121
Nodes/second    : 341085
lantonov commented 7 years ago

sterten
bench 64 1 13,...bench 64 8 13 : 443,1057,1601,2159,2890,3320,3828,3727 kn/s wrong initial position, perft has moves like a1a2,a7h7 etc. starts under droidfish, analysis mode somehow crashes, but now it plays a game against itself apparently correctly 335 kn/s in the startposition with 1 core , 1530 kn/s after some minutes with 8 cores , going down .. (Helio X10 CPU) 320 kn/s with one core, sf8 had 260kn/s (droidfish) playing 100 games now sf may26 (JC) , sf may20 (APE) and armfish , all arm8 compiles, 5 cores each , 1s per move under chess for android , result in ~12h

tthsqe12 commented 7 years ago

if you are saying that armfish is 320knps single core from starting position and sf8 is 260knps on real hardware, then I am led to believe there is a mistake as the armfish code is of exceedingly poor quality from a performance perspective. It simply cant be 20% faster.

I have not tested it in any game scenarios . The reliability of the program should increase once I do this.

lantonov commented 7 years ago

Probably some glitch in the GUI or setup. In emulation mode, I get close to 2000 knps with asmFish single core and 341 knps with armFish single core as seen above.

lantonov commented 7 years ago

armFish of June 28

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
armFish
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes: 206230           284 knps
2:      nodes: 308129           267 knps
3:      nodes: 85572            411 knps
4:      nodes: 178324           330 knps
5:      nodes: 67626            291 knps
6:      nodes: 222188           279 knps
7:      nodes: 138527           265 knps
8:      nodes: 434630           328 knps
9:      nodes: 299555           287 knps
10:     nodes: 100303           303 knps
11:     nodes: 252519           292 knps
12:     nodes: 430788           287 knps
13:     nodes: 316913           300 knps
14:     nodes: 119991           281 knps
15:     nodes: 183964           335 knps
16:     nodes: 82080            325 knps
17:     nodes: 50583            369 knps
18:     nodes: 14498            345 knps
19:     nodes: 81228            441 knps
20:     nodes: 422309           433 knps
21:     nodes: 57924            432 knps
22:     nodes: 34620            540 knps
23:     nodes: 86141            582 knps
24:     nodes: 37505            375 knps
25:     nodes: 7625             254 knps
26:     nodes: 36677            374 knps
27:     nodes: 178098           371 knps
28:     nodes: 275294           344 knps
29:     nodes: 92785            337 knps
30:     nodes: 27869            392 knps
31:     nodes: 98267            488 knps
32:     nodes: 88999            481 knps
33:     nodes: 55559            491 knps
34:     nodes: 77966            435 knps
35:     nodes: 205409           424 knps
36:     nodes: 97833            416 knps
37:     nodes: 271148           398 knps
===========================
Total time (ms) : 17122
Nodes searched  : 5725676
Nodes/second    : 334404
lantonov commented 7 years ago

armFish June 30: speedup is minimal but let's not forget that this is a double emulation. In non-emulated mode speed may be greater

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
armFish
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes: 206230           289 knps
2:      nodes: 308129           320 knps
3:      nodes: 85572            405 knps
4:      nodes: 178324           327 knps
5:      nodes: 67626            300 knps
6:      nodes: 222188           287 knps
7:      nodes: 138527           280 knps
8:      nodes: 434630           324 knps
9:      nodes: 299555           287 knps
10:     nodes: 100303           307 knps
11:     nodes: 252519           287 knps
12:     nodes: 430788           300 knps
13:     nodes: 316913           311 knps
14:     nodes: 119991           288 knps
15:     nodes: 183964           326 knps
16:     nodes: 82080            321 knps
17:     nodes: 50583            356 knps
18:     nodes: 14498            337 knps
19:     nodes: 81228            425 knps
20:     nodes: 422309           424 knps
21:     nodes: 57924            425 knps
22:     nodes: 34620            540 knps
23:     nodes: 86141            578 knps
24:     nodes: 37505            360 knps
25:     nodes: 7625             254 knps
26:     nodes: 36677            352 knps
27:     nodes: 178098           363 knps
28:     nodes: 275294           342 knps
29:     nodes: 92785            331 knps
30:     nodes: 27869            381 knps
31:     nodes: 98267            474 knps
32:     nodes: 88999            470 knps
33:     nodes: 55559            500 knps
34:     nodes: 77966            419 knps
35:     nodes: 205409           415 knps
36:     nodes: 97833            540 knps
37:     nodes: 271148           396 knps
===========================
Total time (ms) : 16845
Nodes searched  : 5725676
Nodes/second    : 339903
lantonov commented 7 years ago

The latest armFish (July 4)

lantonov@DESKTOP-RL8DOC5:/mnt/c/Git/asmFish/armFish$ qemu-aarch64 ./armFish
armFish
bench
*** bench hash 16 threads 1 depth 13 realtime 0 ***
1:      nodes: 206230           290 knps
2:      nodes: 308129           323 knps
3:      nodes: 85572            415 knps
4:      nodes: 178324           325 knps
5:      nodes: 67626            300 knps
6:      nodes: 222188           285 knps
7:      nodes: 138527           282 knps
8:      nodes: 434630           328 knps
9:      nodes: 299555           285 knps
10:     nodes: 100303           319 knps
11:     nodes: 252519           299 knps
12:     nodes: 430788           298 knps
13:     nodes: 316913           313 knps
14:     nodes: 119991           287 knps
15:     nodes: 183964           339 knps
16:     nodes: 82080            319 knps
17:     nodes: 50583            374 knps
18:     nodes: 14498            345 knps
19:     nodes: 81228            443 knps
20:     nodes: 422309           431 knps
21:     nodes: 57924            438 knps
22:     nodes: 34620            549 knps
23:     nodes: 86141            574 knps
24:     nodes: 37505            378 knps
25:     nodes: 7625             262 knps
26:     nodes: 36677            370 knps
27:     nodes: 178098           373 knps
28:     nodes: 275294           339 knps
29:     nodes: 92785            333 knps
30:     nodes: 27869            392 knps
31:     nodes: 98267            461 knps
32:     nodes: 88999            478 knps
33:     nodes: 55559            496 knps
34:     nodes: 77966            435 knps
35:     nodes: 205409           420 knps
36:     nodes: 97833            562 knps
37:     nodes: 271148           405 knps
===========================
Total time (ms) : 16674
Nodes searched  : 5725676
Nodes/second    : 343389