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

nx-cugraph needs to cache graph conversions for dispatched calls made within the context of other calls #4055

Closed
rlratzel opened this issue Dec 8, 2023 · 1 comment
Assignees
Labels
Story Tracking issues as a story level - likely to exist within a single release.

Comments

@rlratzel
Copy link
Contributor

rlratzel commented Dec 8, 2023

Example: each call to k_truss can call isolates 3 times. Because each dispatched API call performs a conversion from the input NX graph to an internal PLC graph, a single k_truss call results in 4 identical conversions.

This problem is causing excessive runtime, which not only defeats the purpose of using a backend but also forces devs to disable tests.

The current proposal to address this problem is to cache graph conversions made by the initial call, then re-use the cached converted graph object for subsequent calls. The cache is then cleared on exit of the initial call in order to prevent using conversions that are stale wrt the current state of the NX graph (ex. the NX graph had nodes or edges added or removed in between algo calls).

@rlratzel rlratzel added the Story Tracking issues as a story level - likely to exist within a single release. label Feb 5, 2024
@rlratzel
Copy link
Contributor Author

The graph conversion caching feature added to NetworkX 3.3 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Story Tracking issues as a story level - likely to exist within a single release.
Projects
None yet
Development

No branches or pull requests

2 participants