cugraph icon indicating copy to clipboard operation
cugraph copied to clipboard

[QST]: LEIDEN CLUSTERING NOT USING GPU

Open siddharthamantrala opened this issue 6 months ago • 7 comments

What is your question?

Hello @benfred @akasper @mattf,

I am trying to run leiden clustering on ~40 M cells. During the run I see the GPU is idle in terms of power usage and is forever to perform the leiden clustering. It takes time to execute the code below. Could I please know how can I sort out the issue?

rsc.tl.leiden(adatafilt) ->

def leiden (args): ->

g = _create_graph(adjacency, use_weights) ->

`def _create_graph(adjacency, use_weights=True): from cugraph import Graph

sources, targets = adjacency.nonzero()
weights = adjacency[sources, targets]
if isinstance(weights, np.matrix):
    weights = weights.A1
df = cudf.DataFrame({"source": sources, "destination": targets, "weights": weights})
g = Graph()
with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    if use_weights:
        g.from_cudf_edgelist(
            df, source="source", destination="destination", weight="weights"
        )
    else:
        g.from_cudf_edgelist(df, source="source", destination="destination")
return g`

Takes forever to execute the below line g.from_cudf_edgelist(df, source="source", destination="destination", weight="weights")

image

Though I posted this in the rapids_singlecell library (rsc), I assume because cuGraph is taking too long, your inputs would be great.

Best, Sid

Code of Conduct

  • [X] I agree to follow cuGraph's Code of Conduct
  • [X] I have searched the open issues and have found no duplicates for this question

siddharthamantrala avatar Aug 22 '24 16:08 siddharthamantrala