-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Implement std::array-like wrapper #43076
Conversation
enable gpu |
please test |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43076/37303
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
9e2724c
to
e01d6f0
Compare
enable gpu |
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43076/37304
|
A new Pull Request was created by @fwyzard (Andrea Bocci) for master. It involves the following packages:
@smuzaffar, @Dr15Jones, @fwyzard, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
-1 Failed Tests: Build HeaderConsistency BuildI found compilation error when building: >> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestCUDAAnalyzerGPU.cc >> Compiling /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestCUDAAnalyzerGPUKernel.cu >> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestCUDAProducerCPU.cc >> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestCUDAProducerGPU.cc /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestAlgo.cc: In function 'void cudatest::testAlgoKernel(cms::cuda::PortableHostCollection >::View, int32_t)': /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/HeterogeneousCore/CUDATest/plugins/TestAlgo.cc:13:43: error: no match for 'operator=' (operand types are 'portabletest::TestSoALayout<>::ViewTemplateFreeParams<128, false, true, false>::element' and '') 13 | view[i] = {0., 0., 0., i, matrix * i}; | ^ In file included from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02807/el8_amd64_gcc12/cms/cmssw-patch/CMSSW_13_3_X_2023-10-20-1100/src/DataFormats/SoATemplate/interface/SoALayout.h:14, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/DataFormats/PortableTestObjects/interface/TestSoA.h:11, from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_13_3_X_2023-10-20-1100/src/CUDADataFormats/PortableTestObjects/interface/TestHostCollection.h:5, |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-43076/37347
|
Pull request #43076 was updated. @Dr15Jones, @makortel, @fwyzard, @smuzaffar can you please check and sign again. |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-f6a1a4/35396/summary.html Comparison SummarySummary:
GPU Comparison SummarySummary:
|
+heterogeneous |
+core |
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. @rappoccio, @antoniovilela, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Due to a ROOT limitation an std::array cannot be serialised to a ROOT file.
See root-project/root#12007 for a discussion on the issue.
This class reimplements the full std::array<T,N> interface, using a regular Reflex dictionary for the ROOT serialisation.
To be more GPU-friendly, all methods are constexpr, and out-of-bound data access aborts instead of throwing an exception.
Note: dictionaries for edm::StdArray<T,N> where T is a standard C/C++ type should be declared in DataFormats/Common/src/classed_def.xml.
PR validation:
The new unit tests pass.
The updated tests using an StdArray in a SoA collection work on CPU and GPU, and the collection can be serialised to a ROOT filed and read back.