Skip to content
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

Add several type aliases and helpers for creating mdarrays #726

Merged
merged 4 commits into from
Jul 5, 2022

Conversation

achirkin
Copy link
Contributor

A few small improvements to mdarrays migrated from #652 :

  • Expose more type aliases for extents and layouts
  • Add generic make_device_mdarray and make_host_mdarray
  • Allow passing an rmm memory resource when creating a container policy (e.g. for creating arrays in managed memory).

@achirkin achirkin requested a review from a team as a code owner June 27, 2022 15:29
@github-actions github-actions bot added the cpp label Jun 27, 2022
@achirkin achirkin added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change and removed cpp labels Jun 27, 2022
Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks very good to me, just had one question.

cpp/include/raft/core/mdarray.hpp Outdated Show resolved Hide resolved
@rg20
Copy link

rg20 commented Jun 27, 2022

LGTM

cpp/include/raft/core/mdarray.hpp Outdated Show resolved Hide resolved
cpp/include/raft/core/mdarray.hpp Outdated Show resolved Hide resolved
cpp/include/raft/core/mdarray.hpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the cpp label Jun 28, 2022
Copy link
Member

@cjnolet cjnolet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good overall and I like the idea of keeping the alises to make things easier for the end-users. Just one minor thing and I think this is ready to go.

@@ -712,10 +823,7 @@ auto make_host_matrix(size_t n_rows, size_t n_cols)
template <typename ElementType, typename LayoutPolicy = layout_c_contiguous>
auto make_device_matrix(size_t n_rows, size_t n_cols, rmm::cuda_stream_view stream)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @trivialfis pointed out, I'd prefer to use the handle here as well. However, for now I'm okay matching what's there and in the future we might scrape through and either add overloads for the handle or change the stream argument to the handle.

cpp/include/raft/core/mdarray.hpp Outdated Show resolved Hide resolved
@achirkin
Copy link
Contributor Author

achirkin commented Jul 1, 2022

rerun tests

@achirkin
Copy link
Contributor Author

achirkin commented Jul 4, 2022

rerun tests

1 similar comment
@achirkin
Copy link
Contributor Author

achirkin commented Jul 4, 2022

rerun tests

@cjnolet
Copy link
Member

cjnolet commented Jul 5, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit fba595d into rapidsai:branch-22.08 Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review cpp improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants