-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Updated SoA View accessors from raw pointers to span #48377
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
base: master
Are you sure you want to change the base?
Conversation
…rtableCollections
cms-bot internal usage |
A new Pull Request was created by @leobeltra for master. It involves the following packages:
@Martin-Grunewald, @Moanwar, @antoniovagnerini, @atpathak, @civanch, @cmsbuild, @ctarricone, @francescobrivio, @fwyzard, @jfernan2, @kpedro88, @makortel, @mandrenguyen, @mdhildreth, @mmusich, @perrotta, @rseidita, @srimanob, @subirsarkar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
type ngt |
enable gpu |
@cmsbuild, please test |
allow @leobeltra test rights |
<< " id @ " << view.metadata().addressOf_id() << " = " << Column(view.id(), view.metadata().size()) << ",\n" | ||
<< " r @ " << view.metadata().addressOf_r() << " = " << view.r() << '\n' | ||
<< " flags @ " << view.metadata().addressOf_flags() << " = " << Column(view.flags(), view.metadata().size()) | ||
<< " x @ " << view.metadata().addressOf_x() << " = " << Column(view.x().data(), view.metadata().size()) |
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.
can you add a constructor for Column that takes a span as a single parameter, and change the code here to use it ?
@@ -76,8 +76,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit { | |||
// for accessing input arrays | |||
int const inputTx = ch >= nchannelsEB ? idx.global - nchannelsEB * nsamples : idx.global; | |||
// eb is first and then ee | |||
auto const* digis_in = ch >= nchannelsEB ? digisDevEE.data()->data() : digisDevEB.data()->data(); | |||
auto const gainId = ecalMGPA::gainId(digis_in[inputTx]); | |||
auto const& digis_in = ch >= nchannelsEB ? digisDevEE.data() : digisDevEB.data(); |
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.
the span is constructed on the fly, so there is no advantage to using a reference.
can you remove the & for consistency with the other changes you made?
@@ -345,7 +344,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::ecal::multifit { | |||
constexpr bool simplifiedNoiseModelForGainSwitch = true; //---- default is true | |||
|
|||
// pulse matrix | |||
auto const* pulse_shapes = reinterpret_cast<const EcalPulseShape*>(conditionsDev.pulseShapes()->data()); | |||
auto const pulse_shapes = reinterpret_cast<const EcalPulseShape*>(conditionsDev.pulseShapes().data()); |
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.
why remove the * ?
7ec6cab
to
394ce12
Compare
394ce12
to
6bbea40
Compare
Pull request #48377 was updated. @Martin-Grunewald, @Moanwar, @antoniovagnerini, @atpathak, @civanch, @cmsbuild, @ctarricone, @francescobrivio, @fwyzard, @jfernan2, @kpedro88, @makortel, @mandrenguyen, @mdhildreth, @mmusich, @perrotta, @rseidita, @srimanob, @subirsarkar can you please check and sign again. |
please test |
-1 Failed Tests: RelVals RelVals-ROCM rocmUnitTests RelVals
RelVals-ROCM
ROCm Unit TestsI found 1 errors in the following unit tests: ---> test testRocmSoALayoutAndView_t had ERRORS CUDA Comparison SummarySummary:
|
PR description:
This PR updates the column accessors in the
View
from raw pointers tostd::span<T>
, providing automatic range checking. Adjustments have also been made in CMSSW to support this new approach. This PR is dependent on #48216, so it should be merged after that.PR validation:
The unit tests in CMSSW still pass.