cugraph icon indicating copy to clipboard operation
cugraph copied to clipboard

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

Open rlratzel opened this issue 1 year ago • 0 comments

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 avatar Dec 08 '23 22:12 rlratzel