-
Notifications
You must be signed in to change notification settings - Fork 433
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
Span of degenerated (zero-length) subviews is not zero in some special cases #2979
Labels
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone
Comments
crtrott
added
the
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
label
Apr 25, 2020
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 27, 2020
Exposing issue kokkos#2979
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 27, 2020
Exposing issue kokkos#2979
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 27, 2020
Fixing an issue where subviews can have non-zero span with zero size. See: issue kokkos#2979
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 27, 2020
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 28, 2020
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 28, 2020
Fixing an issue where subviews can have non-zero span with zero size. See: issue kokkos#2979
crtrott
added a commit
to crtrott/kokkos
that referenced
this issue
Apr 28, 2020
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an issue which likely was here from the beginning. LayoutLeft and LayoutRight have an internal stride for the left most and right most dimension respectively. In the usual scenario the span is calculated for LayoutLeft for example as m_stridem_dim.N1…*m_dim.N7. But if N0 is zero it should be zero. Note that if you construct a zero length view directly with N0 being zero m_stride is explicitly set to zero. But subview will inherit the stride from the original view.
This could in particular lead to issues when trying to deep_copy such a subview. It also lead to trouble in the new prefetch mechanism for UVM allocations (in this particular case because the zero length subview was created with pair(a.extent(0),a.extent(0)) so that the .data() on the subview was actually the end pointer of the original span, which made the pointer an invalid pointer (not-derefenceable) to give to cudaGetPtrAttributes ,..
Trilinos issue: trilinos/Trilinos#7233
The text was updated successfully, but these errors were encountered: