Skip to content
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 13 commits into from
Jul 4, 2023
Merged

Fix integer overflow bug #235

merged 13 commits into from
Jul 4, 2023

Conversation

phstratmann
Copy link
Contributor

@phstratmann phstratmann commented Jun 28, 2023

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:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • Lint (pyb) passes locally
  • Build tests (pyb -E unit) or (python -m unittest) passes locally

Pull request type

Please check your PR type:

  • Bugfix

Copy link
Collaborator

@GaboFGuerra GaboFGuerra left a 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 :)

@AlessandroPierro AlessandroPierro merged commit 9f5505b into lava-nc:main Jul 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants