-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix integer overflow bug #235
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
phstratmann
requested review from
srrisbud,
bamsumit,
AlessandroPierro and
GaboFGuerra
June 28, 2023 10:41
GaboFGuerra
approved these changes
Jun 30, 2023
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.
Thanks Philipp, that was a very larger refactoring, great job!
I left a few comments but set the PR as approved to speed up integration as nothing is really critical, please go through the comments and address at your discretion.
Thanks :)
src/lava/lib/optimization/solvers/generic/monitoring_processes/solution_readout/models.py
Show resolved
Hide resolved
.../optimization/solvers/generic/monitoring_processes/solution_readout/test_solution_readout.py
Show resolved
Hide resolved
tests/lava/lib/optimization/solvers/generic/solution_reader/test_solution_reader.py
Show resolved
Hide resolved
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.
Issue Number: #126
Objective of pull request:
If the total cost of a current solution is too large, then the CostIntegrator currently shows an integer overflow. The resulting cost is thus very negative, and thus the solver stops and claims that it found a particularly good solution.
This PR introduces int32 cost instead of the previous int24 cost.
There is a corresponding PR in Lava-on-Loihi https://github.com/intel-collab/frameworks.ai.lava.lava-loihi/pull/301.
Pull request checklist
Your PR fulfills the following requirements:
pyb
) passes locallypyb -E unit
) or (python -m unittest
) passes locallyPull request type
Please check your PR type: