-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Parallelize the Rounding Stage of GCS #22222
base: master
Are you sure you want to change the base?
Conversation
@drake-jenkins-bot linux-jammy-clang-bazel-experimental-thread-sanitizer please |
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.
Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @cohnt)
geometry/optimization/graph_of_convex_sets.cc
line 1618 at r1 (raw file):
// If any costs or constraints aren't thread-safe, we can't parallelize. bool is_thread_safe = true;
Don't forget to set options.kMaxThreads = 1
and make sure to warn if is_thread_safe == false && parallelism.num_threads() > 1
, otherwise users might be surprised if the extra threads aren't used.
…ts or constraints. Also make sure only one thread is used per solver.
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.
Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers, labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits), missing label for release notes (waiting on @cohnt)
geometry/optimization/graph_of_convex_sets.cc
line 1618 at r1 (raw file):
Previously, AlexandreAmice (Alexandre Amice) wrote…
Don't forget to set
options.kMaxThreads = 1
and make sure to warn ifis_thread_safe == false && parallelism.num_threads() > 1
, otherwise users might be surprised if the extra threads aren't used.
Done.
This ended up being pretty simple -- solve all the restrictions in a parallel for loop, and override
options.parallelism
to set the number of threads to one if any not-thread-safe costs or constraints are included in the GCS.Gonna test this with the various debug builds before I send it up for review.
This change is