COMBINE-lab / cuttlefish

Building the compacted de Bruijn graph efficiently from references or reads.
BSD 3-Clause "New" or "Revised" License
81 stars 9 forks source link

Potential arm support? #19

Open michaelbarton opened 1 year ago

michaelbarton commented 1 year ago

Hi! Would you be interested in arm support in future? I gave it a shot today and and think the -m64 CFLAG in the kmc patch precludes this. Thanks!

rob-p commented 1 year ago

Hi @michaelbarton,

Yes; this is something that we'd be interested in supporting in the future — both to work natively on the new Apple arch, as well as to allow users to make use of Arm instances in the cloud.

I am not sure what will need to change to support ARM. But we'd be willing to explore that question and help out with an effort to make it cross-architecture.

Best, Rob

michaelbarton commented 1 year ago

Cheers Rob! I managed to get it working on arm arch in a Docker image using the '--platform=linux/x86' flag to enable emulation. It's quite a bit slower because of the emulation but I was able to get output. Great tool! Thanks!

rob-p commented 1 year ago

Hi @michaelbarton,

After some time, we have a positive update on this. @theJasonFan has taken the opportunity to patch the version of KMC that we use to adopt SIMDe. This allows KMC to compile natively for ARM and dispatch dynamically to the correct intrinsics. The rest of cuttlefish doesn't explicitly use intrinsics, and so the whole thing compiles cleanly and runs on the M1 and M2 machines to which we have access. Ideally, it should also work on other ARM processors (e.g. gravitron), but we haven't had a chance to test that yet.

If you'd like to give this a try, you can build directly from the develop branch, which has these latest changes. When these changes make it into a tagged release, we'll describe it in the release notes.

Best, Rob