-
Notifications
You must be signed in to change notification settings - Fork 22
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
Prevent messages persisting between iterations #973
Conversation
082f430
to
a1b25e4
Compare
Full test suite passes for release with belts under linux:
If any models rely on persistence then this will break them however. |
Yeah I don't agree with this change. Add a HostAPI method for users to manually purge message lists, and bin this PR. |
a1b25e4
to
39b33d9
Compare
7f7d974
to
7a036c0
Compare
This is now ready for review, as a PR which makes non-persistent messages default, with opt-in to persistence for each message list. Adds C++ and python tests for new features, but only checks persistence behaves correctly for brute force messages and bucket messages (in the interest of time, they are not simple tests). |
Message lists are now non-persistent by default (messages from the previous iteration are no longer available prior to output in the current iteration) message lists can be marked as persistent by calling .getPersistent() on the description object. Adds brute-force tests to check get/set works as intended Adds brute-force tests for persistence / non-persistence working on a multi-iteation simulation Adds Bucket persistence / non-persistence tests (C++ only)
This fixes a swig linker issue on Windows CI, which is somehow related to the using statements.
3f49f2c
to
5f4f9c7
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.
Haven't tested personally, but looks thorough (you have a Python test which would have been my main concern).
Message lists previously would persist from one iteration to the next, due to comparable behaviour in FLAME GPU 1.
This semi-breaks the intended state machine, but is potentially a useful optimiation in some very edge cases.
This PR (now) implements message lists persistence, through a property on the messageDescription object, e.g.
Message lists which are not marked as persistent are set to 0 length and the appropraite flags set to rebuild data structures prior to their next use at the end of each step (i.e. lazy resetting to avoid unneccesary memsets).
getPersistent
setPersistnt
Closes #247
Original PR text for posterity
Add test(s) which detect messages persisting from one iteration to the nextPrevent messages persisting from one iteration to the next (via resetting at the end of the iteration)This is based on 972 due to common test code.