-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[analysis] Update MonteCarlo to use Parallelism API #20785
[analysis] Update MonteCarlo to use Parallelism API #20785
Conversation
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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee calderpg-tri, needs platform reviewer assigned, needs at least two assigned reviewers
systems/analysis/test/monte_carlo_test.cc
line 292 at r1 (raw file):
num_samples, &generator, kNoConcurrency); MonteCarloSimulation(make_simulator, &GetScalarOutput, final_time, num_samples, &generator, kUseHardwareConcurrency);
It probably doesn't matter for such a simple test system, but note that this will use more threads than before (and more than are specified in the test rule).
The following are deprecated: - drake::systems::analysis::kNoConcurrency - drake::systems::analysis::kUseHardwareConcurrency - drake::systems::analysis::MonteCarloSimulation overload that accepts the num_parallel_executions bare integer.
14c29d7
to
b8c5003
Compare
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.
+@sherm1 for platform review per schedule, please.
Reviewable status: 1 unresolved discussion, LGTM missing from assignees calderpg-tri,sherm1(platform)
systems/analysis/test/monte_carlo_test.cc
line 292 at r1 (raw file):
Previously, calderpg-tri wrote…
It probably doesn't matter for such a simple test system, but note that this will use more threads than before (and more than are specified in the test rule).
Good point, that was doing more harm than good.
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: LGTM missing from assignee sherm1(platform)
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.
Platform with one ignorable suggestion
Reviewed 4 of 5 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion
bindings/pydrake/systems/analysis_py.cc
line 404 at r2 (raw file):
-> std::vector<RandomSimulationResult> { return MonteCarloSimulation(make_simulator, output, final_time, num_samples, generator, /* parallelism = */ Parallelism::None());
BTW the /* parallelism = */
comment seems superfluous here (would make sense if using the false
abbreviation)
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: complete! all discussions resolved, LGTM from assignees calderpg-tri,sherm1(platform)
bindings/pydrake/systems/analysis_py.cc
line 404 at r2 (raw file):
Previously, sherm1 (Michael Sherman) wrote…
BTW the
/* parallelism = */
comment seems superfluous here (would make sense if using thefalse
abbreviation)
Fair, but for my taste I like highlighting the pseudo-py::arg
name here, as a kind of placeholder, grep target, etc. Omitting a kwarg in a binding is quite unusual, so the more I can do to help call attention to the oddity, the better (I hope).
+@calderpg-tri for feature review, please.
This change is