-
Notifications
You must be signed in to change notification settings - Fork 63
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
GPU-friendly + vectorized pareto ranking #32
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 53.28% 52.97% -0.31%
==========================================
Files 43 43
Lines 6223 6227 +4
==========================================
- Hits 3316 3299 -17
- Misses 2907 2928 +21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
engintoklu
force-pushed
the
feature/fast-pareto
branch
from
November 18, 2022 14:17
23572d9
to
975e104
Compare
Higgcz
previously approved these changes
Nov 23, 2022
…hat it is now vectorized along the pareto front and uses torch tensors only - Add _compute_pareto_ranks to evotorch.core that computes the rank tensor previously returned by the _pareto_sort_np function, but in a vectorized and GPU-friendly manner - Update _pareto_sort function of evotorch.core so that it uses the new _compute_pareto_ranks function - Update SolutionBatch.arg_pareto_sort() so that it complies with the update _pareto_sort function (crowdsort_upto argument no longer in use) - Add SolutionBatch.compute_pareto_ranks() function which skips the sparse computation of the fronts (useful when not needed) - Update SolutionBatch.take_best() function to use SolutionBatch.compute_pareto_ranks() rather than SolutionBatch.arg_pareto_sort() - Update evotorch.operators.base.CrossOver._do_tournament so that it uses SolutionBatch.compute_pareto_ranks() rather than SolutionBatch.arg_pareto_sort()
Higgcz
force-pushed
the
feature/fast-pareto
branch
from
November 25, 2022 18:06
975e104
to
606b46a
Compare
Higgcz
approved these changes
Nov 25, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A variety of QOL + performance changes for pareto-ranking related functionality. Together, I've observed performance speedups when running SteadStateGA (NSGA-II) with very large populations (e.g. 3,200), in the order of 20x faster training. In theory, the speedup should be even better on the GPU, which wasn't possible before, but that hasn't been tried out yet.
An overview of the changes:
_compute_pareto_ranks
toevotorch.core
that computes the rank tensor previously returned by the_pareto_sort_np
function, but in a vectorized and GPU-friendly manner_pareto_sort
function ofevotorch.core
so that it uses the new_compute_pareto_ranks
functionSolutionBatch.arg_pareto_sort()
so that it complies with the update_pareto_sort
function (crowdsort_upto
argument no longer in use)SolutionBatch.compute_pareto_ranks()
function which skips the sparse computation of the fronts (useful when not needed)SolutionBatch.take_best()
function to useSolutionBatch.compute_pareto_ranks()
rather thanSolutionBatch.arg_pareto_sort()
evotorch.operators.base.CrossOver._do_tournament
so that it usesSolutionBatch.compute_pareto_ranks()
rather thanSolutionBatch.arg_pareto_sort()