Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEA]: Implement spectral_ordering #4793

Open
2 tasks done
adsharma opened this issue Nov 27, 2024 · 3 comments
Open
2 tasks done

[FEA]: Implement spectral_ordering #4793

adsharma opened this issue Nov 27, 2024 · 3 comments
Labels
? - Needs Triage Need team to review and classify feature request New feature or request

Comments

@adsharma
Copy link

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Critical (currently preventing usage)

Please provide a clear description of problem this feature solves

networkx implements a spectral_ordering algorithm that's useful for some applications. I couldn't find a GPU accelerated variant in cugraph.

I see two spectral clustering algorithms, which are not the same.

Describe your ideal solution

Implement a cugraph equivalent of nx.spectral_ordering()

Describe any alternatives you have considered

Used the CPU variant. It was slow.

Additional context

No response

Code of Conduct

  • I agree to follow cuGraph's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
@adsharma adsharma added ? - Needs Triage Need team to review and classify feature request New feature or request labels Nov 27, 2024
@adsharma
Copy link
Author

Some research on why existing spectral clustering algorithms in cugraph are insufficient:

https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.5.023006

@adsharma
Copy link
Author

Extracted networkx code for easier testing:

https://github.com/adsharma/nx-spectral-ordering

Here's my attempt to speed it up:
adsharma/nx-spectral-ordering@6bb1373

Runs an algorithm copied from cupy.dev (link in the commit), but fails functional testing. Needs more debug.

Also I heard that cuSparse has a PCG solver. Not sure how to invoke it from python.

@adsharma
Copy link
Author

Modified the networkx PCG solver to use cupy. It works, but is not faster.

https://github.com/adsharma/nx-spectral-ordering/compare/f2073213a8984e2db4816f1cfa21d61fd0402531..7104b1d74139875bab500652b316d1e6ad06995b

Still interested in exploring if cuSparse PCG solver is a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant