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

[Question]: Usage of Graph Algorithms and Any Slowdowns? #7008

Open
nv-rliu opened this issue Feb 26, 2025 · 4 comments
Open

[Question]: Usage of Graph Algorithms and Any Slowdowns? #7008

nv-rliu opened this issue Feb 26, 2025 · 4 comments

Comments

@nv-rliu
Copy link

nv-rliu commented Feb 26, 2025

Hi there,

I'm interested in understanding if pennylane depends on any graph algorithms from its usage of NetworkX? If so,

  • What algorithms are used for what purpose?
  • What graph sizes are they being used with?
  • Have users experienced any slowdowns or issues with algorithms provided by NetworkX? (Speed, algorithm availability, etc)

Furthermore, would users be interested in accelerated nx algorithms via a GPU backend? This would involve zero code change.

Any insight into this topic would be greatly appreciated! Thank you.

@mlxd
Copy link
Member

mlxd commented Feb 26, 2025

Hi @nv-rliu thanks for dropping by. Right now we have had a few tie-ins to networkx in the past, but over the past 1-2 years we have mostly migrated to rustworkx for performance-critical graph methods. Most of our remaining networkx support is for simple structuring/representation conveniences. I can summarise below:

  1. Where do we use NetworkxX/RustworkX

  2. Why RustworkX and not NetworkX?

  3. Was NX too slow

The above are direct replacements of networkx with rustworkx in our stack, though if it is an easy opt-in for cuGraph acceleration via networkx, we can potentially consider introduction of an API layer supporting both packages as backends.

Assuming they are supported, can you share any data of mapping the above functions directly to the GPU through networkx?
Also, does there exist an upcoming feature roadmap of support that we could consider?
Anything else you'd like to know, or anything else you think may be useful for us?

Thanks again.

@nv-rliu
Copy link
Author

nv-rliu commented Mar 6, 2025

Thanks for the insight! Yes, I agree NetworkX is great in many ways but speed at scale is not one of them.

My team and I have recently been working on promoting a GPU-accelerated backend for NetworkX, which allows you to greatly speed up graph algorithms at scale with GPUs, all with zero code change (sorry if this sounds too marketing, haha). This has been an ongoing collaboration with the NetworkX developers as well. (backends came out with the 3.0 release).

Pardon me but let me take a look at the times for those algorithms with different graph sizes.

@nv-rliu
Copy link
Author

nv-rliu commented Mar 6, 2025

As far as feature roadmaps, we're currently reaching out to projects that could benefit from GPU accelerated NetworkX and gauging what algorithms they'd like to see added to the NetworkX dispatching mechanism.

@CatalinaAlbornoz
Copy link
Contributor

That's great @nv-rliu !

We're getting some info on what our teams here would need. We'll get back to you on this next week.

Have a good weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants