-
-
Notifications
You must be signed in to change notification settings - Fork 190
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 Aliasing issue in OpenCL #2943
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
… Creates a assignment op tag that is used by adjoint_results to do a += instead of a = into the adjoint matrix
SteveBronder
changed the title
Fix/plusequals assign opencl
Fix Aliasing issue in OpenCL
Sep 13, 2023
…to fix/plusequals-assign-opencl
@rok-cesnovar or @t4c1 would one of you have time to look at this? |
Sure thing, will have a look in the next days. |
@rok-cesnovar can you take a look at this? |
rok-cesnovar
approved these changes
Sep 28, 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.
Looks great. I was not getting any issues running the tests locally, so I think this is good to go.
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.
Summary
Fixes #2942 by adding compound assignment operators to
result_cl
so that assignments in the generated OpenCL for adjoint calculations use+=
such as the belowTests
Tests are added for the compound assignment and can be run via
Side Effects
Locally I've been getting spurious errors for some of the reverse mode pdf distributions not matching the cpu versions? Though none of those touch the compound operators so I'm not sure why that is happening
Release notes
Fixes aliasing issue in adjoint acccumulation for OpenCL
Checklist
Math issue Aliasing issue in OpenCL
assignment_impl
#2942Copyright holder: Steve Bronder
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested