Skip to content

Conversation

@jgfouca
Copy link
Member

@jgfouca jgfouca commented Oct 21, 2025

Use case that is now supported:

  view_t view("view", dim1, dim2);
  ekat::host_to_device( {raw_data.data()}, dim1, dim2*pack_size, std::vector<view_t>{view});

So, view is an already-allocated view, or could also be an unmanaged view that has already been set up. This was previously not supported as h2d insisted on taking a non-const vector of view handles and it created the device views for you.

Motivation

@whannah1 wants to use the API this way.

Testing

I added a test for this in the pack_kokkos unit tests.

@jgfouca jgfouca requested review from bartgol and whannah1 October 21, 2025 19:53
@jgfouca jgfouca self-assigned this Oct 21, 2025
@jgfouca jgfouca merged commit d63c58f into master Oct 21, 2025
4 checks passed
@jgfouca jgfouca deleted the jgfouca/add_h2d_sugar branch October 21, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants