-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add possibility for a CopyToHost::postCopy()
operation
#45801
Conversation
cms-bot internal usage |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45801/41540
|
A new Pull Request was created by @makortel for master. It involves the following packages:
@cmsbuild, @fwyzard, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
enable gpu |
@cmsbuild, please test |
type -changes-dataformats The added data format classes are transient (and part of testing suite). |
+1 Size: This PR adds an extra 40KB to repository Comparison SummarySummary:
GPU Comparison SummarySummary:
|
Milestone for this pull request has been moved to CMSSW_14_2_X. Please open a backport if it should also go in to CMSSW_14_1_X. |
6c357de
to
0db641f
Compare
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45801/41622
|
@cmsbuild, please test |
+1 Size: This PR adds an extra 20KB to repository Comparison SummarySummary:
GPU Comparison SummarySummary:
|
+heterogeneous @makortel I'm fine with the changes and with this approach. I'm wondering if there could be a more self-contained approach, where the data structure could define a |
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. @mandrenguyen, @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
The thing next closest to a method would be a standalone function. Just to remind, with Within the class template specialization approach I considered making a separate (say Given that the These decisions can, of course, be revisited if my assumptions above turn out to be wrong. |
PR description:
Following #45708 (comment) this PR adds the possibility for a
CopyToHost<T>::postCopy()
function, that is called by the implicit data product device-to-host copy operation after the copy has finished (but only if thepostCopy()
function is defined). This facility allows data products that need to be updated after amemcpy()
(e.g. because they have pointers to itself) to be used without blocking synchronization calls inCopyToHost::copyAsync()
. I expect (hope) we will ever have only at most few such data products.The first commit has a C++17 SFINAE -based solution for checking if the
CopyToHost<T>::postCopy()
exists (that can be backported to 14_0_X), and the second commit replaces that with C++20 concepts-based solution.Resolves cms-sw/framework-team#989
PR validation:
Added unit test runs on CPU-only and NVIDIA GPU nodes.
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
To be backported to 14_1_X, and to 14_0_X (first commit only).Following #45708 (comment) not to be backported.