-
Notifications
You must be signed in to change notification settings - Fork 197
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
Update mdspan
to account for changes to extents
#751
Conversation
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.
Approving ops-codeowner
file changes
cpp/include/raft/core/mdarray.hpp
Outdated
{ | ||
return extents_type::rank(); | ||
} | ||
[[nodiscard]] MDSPAN_INLINE_FUNCTION static constexpr auto rank_dynamic() noexcept -> index_type | ||
[[nodiscard]] MDSPAN_INLINE_FUNCTION static constexpr auto rank_dynamic() noexcept -> std::size_t |
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.
Is the mdarray itself not able to return index_type
?
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.
Done
device_matrix_view<Type, layout> const x, | ||
device_matrix_view<Type, layout> const y, | ||
device_matrix_view<Type, layout> dist, | ||
device_matrix_view<Type, Index_, layout> const x, |
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.
If we add the Index_
as a third type, we can default it to std::size_t
and then we won't break any APIs downstream.
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.
Will do, although it will be non-breaking if default is int
as that is what it was before
@gpucibot merge |
extents
now allows for anIndexType
to index dimensions. This PR reflects those updates and tags to kokkos/mdspan@3309ce9The update also follows three API changes:
raft::mdarray/mdspan::data()
is renamed toraft::mdarray/mdspan::data_handle()
raft::mdarray/mdspan::is_contiguous()
is renamed toraft::mdarray/mdspan::is_exhaustive()
raft::mdarray/mdspan::is_always_contiguous()
is renamed toraft::mdarray/mdspan::is_always_exhaustive()