Closed torognes closed 5 years ago
or ARM64, as it seems to be the future for consumer electronics.
I have rewritten the assembly code in search8.cc and search16.cc to x86_64 intrinsics and simplified it. (Not pushed to Github yet.) It should now be easy to port it to ARM64 and POWER8. It will also make it easier to rewrite the code to use AVX2 with 256-bit wide registers as discussed for issue #12.
The changes with intrinsics have been pushed already. The zobrist branch is renamed to swarm3.
Swarm 3 now seems to work as it should on ARMv8. The sixteen channel 8-bit search is slower than the 16-bit search though, so it is not used.
Added support for POWER8 CPUs. Not very fast though, compared to x86_64 and ARMv8.
Ported to Windows as well.
It now runs on Linux (x86_64, arm & power8), Mac (x86_64) and Windows (x86_64).
Considered done.
Hi Torbjørn,
I finally set out to test compilation on my ARM system (Raspberry pi 3+), but it fails:
git clone https://github.com/torognes/swarm.git
cd ./swarm/
git checkout origin/swarm3
make
make -C src swarm
make[1]: Entering directory '/home/pi/swarm/src'
g++ -g -flto -O3 -march=armv8-a+simd -mtune=generic -flax-vector-conversions -std=c++11 -Wall -Wsign-compare -Wextra -Wno-long-long -pedantic -Icityhash -c -o swarm.o swarm.cc
In file included from swarm.cc:24:0:
swarm.h:34:18: fatal error: city.h: No such file or directory
#include <city.h>
^
compilation terminated.
<builtin>: recipe for target 'swarm.o' failed
make[1]: *** [swarm.o] Error 1
make[1]: Leaving directory '/home/pi/swarm/src'
Makefile:30: recipe for target 'bin/swarm' failed
make: *** [bin/swarm] Error 2
which is weird since city.h
is present in the ./src/
directory (along with citycrc.h
).
It should probably be #include "city.h"
instead of #include <city.h>
in swarm.h
. Will fix tomorrow.
A few more files needed a modification to properly include the city.h
file. Should be fixed now in commit e31646244a3339eddb67577974cdffc3310832b5.
Perfect, compilation is now possible on my Raspberry. There are about 15 unit-tests failing, I will investigate to try to understand why.
swarm 3 passes all tests on a Raspberry running Linux.
Perhaps we should port Swarm to Linux on POWER8 and Windows on x86_64 as we have done for vsearch?