dpeerlab / Harmony

Harmony framework for connecting scRNA-seq data from discrete time points
GNU General Public License v2.0
44 stars 12 forks source link

gpu additions #18

Closed LouisFaure closed 3 years ago

LouisFaure commented 3 years ago

As discussed on issue #17, here is a pull request with gpu accelerated code added! A simple device="gpu" is needed when calling harmony.core.augmented_affinity_matrix and harmony.plot.force_directed_layout.

The code has been tested and needs rapids-0.17 as well as cupy>=9.0 (I haven't added these packages to the requirements, I instead mention these in the README), right now cupy 9.0 is in beta, but a stable version should be out in the coming months.

Here is what is happening when running on GPU:

As a side note, _mnn_ka_distances function has been slightly modified for speedups.

Here is a comparison using the included example data:

Screenshot 2021-02-28 162055

ManuSetty commented 3 years ago

Fantastic - thank you very much! Appreciate your contributions.