gagolews / genieclust

Genie: Fast and Robust Hierarchical Clustering with Noise Point Detection - in Python and R
https://genieclust.gagolewski.com
Other
58 stars 10 forks source link

Support parallelism via OpenMP and n_jobs param #27

Closed gagolews closed 4 years ago

gagolews commented 4 years ago
        @TODO once n_jobs params are added
        if c == "msvc":
            for e in self.extensions:
                e.extra_compile_args += "/openmp"
        elif c == "mingw32":
            for e in self.extensions:
                e.extra_compile_args += "-fopenmp"
                e.extra_link_args += "-fopenmp"
        elif c == "unix":
            # Well... gcc/clang has -fopenmp,
            # icc has -openmp, oracle has -xopenmp, etc.
            # The user should specify CXXFLAGS and LDFLAGS herself, I think.
            pass
gagolews commented 4 years ago

exact=False: FAISS uses OpenMP/GPU see https://github.com/facebookresearch/faiss/blob/master/configure

gagolews commented 4 years ago

exact=True:

uses internal.mst_from_distance which is based on openmp'd CDistances moreover, if M>1, then sklearn.neighbors.NearestNeighbors are used to compute d_core first

gagolews commented 4 years ago

n_jobs -- set OMP_NUM_THREADS