Open iarspider opened 1 month ago
cms-bot internal usage
A new Issue was created by @iarspider.
@antoniovilela, @smuzaffar, @makortel, @rappoccio, @sextonkennedy, @Dr15Jones can you please review it and eventually sign/assign? Thanks.
cms-bot commands are listed here
assign HeterogeneousCore/AlpakaInterface,RecoTracker/PixelSeeding
New categories assigned: heterogeneous,reconstruction
@fwyzard,@jfernan2,@makortel,@mandrenguyen you have been requested to review this Pull request/Issue and eventually sign? Thanks
First occurrence in CMSSW_14_1_X_2024-06-05-2300
@AdrianoDee in case you haven't received this already
This is probably not a real issue. [I think I was wrong initially] https://github.com/cms-sw/cmssw/blob/64d4f3b087ce5832f186bc811757c17e16fb9ddd/RecoTracker/PixelSeeding/plugins/alpaka/CAHitNtupletGeneratorKernelsImpl.h#L552-L553
with the final line calls
notice the b+1
. The documentation for uniform_elements
has
so the b+1
will be the size of the container so off[b+1]
at first glance seems to be off the end of the container.
However, looking at the definition of nOnes()
and
then assuming capacity
is the true size of the container, than off[b+1]
for the end condition should be off[ (nOnes()-1) +1]
==off[( (totOnes()-1)-1 ) +1 ]
== off[totOnes() -1]
@Dr15Jones thanks for looking into this issue 👍🏻
yep. All that was indeed intentional (at least in the CUDA version).
I have opened https://github.com/cms-sw/cmssw/pull/45340 to suppress this error
One more item, if I add
assert(static_cast<decltype(tracks_view.hitIndices().nOnes())>(idx) < tracks_view.hitIndices().nOnes());
right before the call to size
the warning goes away. Evidently that helped the link time optimizer to see the index can not go out of bounds. The question is why the optimizer thinks uniform_elements
can go out of bounds when given nOnes()
as the end point.
A bit more investigation, if I change the loop condition to actually be on the end, i.e.
for (auto idx : cms::alpakatools::uniform_elements(acc, tracks_view.hitIndices().totOnes()))
the warning states that the value goes 1 beyond the end, instead of just the end (which is what is actually going on). So the compiler really thinks that cms::alpakatools::uniform_elements
end condition is inclusive instead of exclusive.
In all IBs, GCC emits the following warnings: