-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rust Integration: Full find_min_cut
Rust Integration
#3
Conversation
(just noting down some things for myself) Cost Model Issues
Edit: also found this dedicated trait bounds guide on the official pyo3 docs, didn't look through it deeply but could be helpful. |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful. Nothing major. Thanks for your work!
Co-authored-by: Jae-Won Chung <jwnchung@umich.edu>
Co-authored-by: Jae-Won Chung <jwnchung@umich.edu>
… not used anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, very cool. Thanks @ohjuny!
Oh, you're right. Sounds good! |
This PR follows #1 (and replaces #2 ), which sets up pyo3 integration and replaces calls to
nx.maximum_flow
with a Rust implementation.This PR replaces the entire call to
find_min_cut
with an equivalent Rust version. In particular, this means that the pre/post-processing of the capacity DAG is performed in Rust, and no Python/Rust context-switch is required during the entirety offind_min_cut
.Profiling across 9 workloads:
Additional notes: this PR initially aimed to also provide implementations for
Operation
andCostModel
in Rust, so thatannotate_capacity
andreduce_durations
could also be offloaded to Rust. However, there were some issues with usingpyo3
to represent a trait-boundCostModel
- there is a more detailed comment in the PR about this. The next steps for full Rust integration are outlined in Issue #4.