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
Protected mutex locking with RAII. #30501
Conversation
In case some of the cudaCheck() calls threw (line 596), the mutex would have been left locked.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30501/16690
|
A new Pull Request was created by @ericcano (Eric Cano) for master. It involves the following packages: HeterogeneousCore/CUDAUtilities @makortel, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@makortel what do you think ? In general I prefer to use |
In general I agree on |
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, I never really liked the explicit locking of the mutex
anyway. For CachingDeviceAllocator
we try to document inline the changes CMS has done to the CachingDeviceAllocator
from cub
.
Could you do similar changes to CachingHostAllocator
as well (comment decoration are not needed there because it is all CMS code, even if cloned from the CachingDeviceAllocator
).
Co-authored-by: Matti Kortelainen <matti.kortelainen@cern.ch>
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30501/16708
|
Sure, I will add that to the PR. |
In case some of the cudaCheck() calls threw (line 596), the mutex would have been left locked. (Ported from CachingDeviceAllocator). Also merged instanciation and locking where they appeared bach-to-back in CachingDeviceAllocator.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30501/16713
|
@cmsbuild, please test Thanks! |
The tests are being triggered in jenkins.
|
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
In case some of the cudaCheck() calls threw (line 596), the mutex would have been left locked.
PR description:
This PR fixes a possible leftover locked mutex in case of exception.
PR validation:
if this PR is a backport please specify the original PR and why you need to backport that PR: