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 documentation for SequentialHostInit #607

Merged
merged 5 commits into from
Dec 2, 2024

Conversation

crtrott
Copy link
Member

@crtrott crtrott commented Nov 27, 2024

This also expands documentation for WithoutInitializing.

@masterleinad
Copy link
Contributor

We should also talk about SequentialHostInit in https://kokkos.org/kokkos-core-wiki/ProgrammingGuide/View.html#can-i-make-a-view-of-views and discuss pitfalls and limitations wrt, e.g, DualView, deep_copy, resize and realloc.

@crtrott
Copy link
Member Author

crtrott commented Nov 28, 2024

I added the memory space restrictions and also updated the Programming Guide.

@crtrott
Copy link
Member Author

crtrott commented Nov 28, 2024

We should also talk about SequentialHostInit in https://kokkos.org/kokkos-core-wiki/ProgrammingGuide/View.html#can-i-make-a-view-of-views and discuss pitfalls and limitations wrt, e.g, DualView, deep_copy, resize and realloc.

I have updated Programming Guide but have not discussed pitfalls with respect to DualView etc.

Comment on lines +76 to +77
`SequentialHostInit` can only be used when creating host accessible `View`s, such as `View`s with `HostSpace`, `SharedSpace`,
or `SharedHostPinnedSpace` as memory space.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the DualView case be mentioned here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that is part of a larger paragraph including realloc and resize I would want to do that in a second pass.

@@ -145,7 +145,57 @@ Another issue is that View construction in a Kokkos parallel region does not upd

Here is how to create a View of Views, where each inner View has a separate owning allocation:

1. The outer View must have a memory space that is both host and device accessible, such as `CudaUVMSpace`.
1. The outer View must have a memory space that is both host and device accessible, such as :cppkokkos:type:`SharedSpace`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the possibility of using a DualView for the outer view be mentioned as an alternative?

Copy link
Member

@tpadioleau tpadioleau left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@crtrott crtrott merged commit c7595a9 into kokkos:main Dec 2, 2024
2 checks passed
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.

4 participants