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

Only copy data in UnorderedMap deep_copy #6812

Merged
merged 3 commits into from
May 28, 2024

Conversation

tcclevenger
Copy link
Contributor

Previously, deep_copy(UnorderedMap,UnorderedMap) acted much more similar to create_mirror_view_and_copy() which allocated the dst view and then deep_copy the data. Now deep_copy requires the capacity of the src and dst UnorderedMaps are identical and deep copies all data from src to dst.

Also changed

  • Deprecated old behavior
  • Separate UnorderedMap::create_copy_view() into allocate_view() and deep_copy_view()
  • Create a create_mirror(UnorderedMap) specialization

- Previous behavior was closer to create_mirror_view_and_copy
- Now, no changes to meta data, only assert capacity matches and deep copy view data
- add a create_mirror() function for UnorderedMaps
@tcclevenger tcclevenger marked this pull request as draft February 13, 2024 17:17
@tcclevenger
Copy link
Contributor Author

Fails on SYCL and HIP builds appear unrelated. I manually tested container unit tests on MI100 (caraway) and got passes for Serial and HIP tests.

@tcclevenger tcclevenger self-assigned this Feb 13, 2024
@tcclevenger tcclevenger marked this pull request as ready for review February 13, 2024 21:36
@tcclevenger tcclevenger added Deprecate Items to be deprecated Kokkos-Containers labels Feb 13, 2024
@crtrott
Copy link
Member

crtrott commented Apr 28, 2024

Retest this please

1 similar comment
@masterleinad
Copy link
Contributor

Retest this please

@tcclevenger
Copy link
Contributor Author

I think the only fail is a CI issue, not with this PR.

@masterleinad
Copy link
Contributor

Only CUDA-11.0-NVCC-RDC failed on fetnat07 with a jenkins problem.

@crtrott crtrott merged commit 7472ed7 into kokkos:develop May 28, 2024
32 of 33 checks passed
@ndellingwood
Copy link
Contributor

@dalg24 @tcclevenger does this merit an entry for the 4.4 changelog? Since it is a change of behavior, including deprecation, it seems notable to add?

@dalg24
Copy link
Member

dalg24 commented May 29, 2024

Deferring to Christian and Conrad.

@tcclevenger
Copy link
Contributor Author

Yeah, this probably deserves an entry. I'll add one.

@tcclevenger tcclevenger deleted the unorderedmap_deepcopy branch May 29, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Items to be deprecated Kokkos-Containers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deep_copy(UnorderedMap) acts like assignment from create_mirror_view_and_copy
5 participants