ByteHamster / GpuRecSplit

Parallel space-efficient minimal perfect hash function on SIMD and GPU
GNU General Public License v3.0
14 stars 0 forks source link

Non-architecture specific parallel RecSplit? #1

Closed meling closed 1 year ago

meling commented 1 year ago

I recently moved to a Mac with M2 Max processor and building the project fails due to missing header file (see below). I was curious if there was a parallel version of RecSplit that does not depend on x86-specific instructions? (It wasn't clear to me from the code.)

#0 2.266 [ 97%] Building CXX object CMakeFiles/recsplit_construction.dir/benchmark/benchmark_construction.cpp.o
#0 2.331 In file included from /opt/gpurecsplit/include/function/../util/Vector.hpp:31,
#0 2.331                  from /opt/gpurecsplit/include/function/RecSplitRotate.hpp:45,
#0 2.331                  from /opt/gpurecsplit/benchmark/benchmark_construction.hpp:30,
#0 2.331                  from /opt/gpurecsplit/benchmark/benchmark_construction.cpp:1:
#0 2.331 /opt/gpurecsplit/include/function/../util/../support/common.hpp:41:10: fatal error: x86intrin.h: No such file or directory
#0 2.331    41 | #include <x86intrin.h>
#0 2.331       |          ^~~~~~~~~~~~~
#0 2.331 compilation terminated.
ByteHamster commented 1 year ago

I recently moved to a Mac with M2 Max processor and building the project fails due to missing header file (see below).

I don't have access to an M2, but I uploaded some changes that make the non-SIMD version compile on an ARM processor. I hope that the changes also make it work on an M2.

I was curious if there was a parallel version of RecSplit that does not depend on x86-specific instructions?

There was none, but I changed the implementation yesterday to share most code between the SIMD and non-SIMD version. The benchmarks I ran overnight indicate that the non-SIMD multi-threaded scaling behavior is similar to the SIMD version.


By the way, given that you have created issues on two of my perfect hashing repos, I'm curious. Are you working on perfect hashing directly? Or are you using perfect hashing in another application? Maybe there is room for collaboration.

meling commented 1 year ago

Thanks for taking the time to look into it; I'll check it out towards the end of next week -- I have a deadline and a few other duties. About collaboration; I'm interested. Maybe we could connect via email (firstname.lastname at uis.no) and I can explain the reasons for my interest ;-)

ByteHamster commented 1 year ago

Nothing left to do here :)