-
Notifications
You must be signed in to change notification settings - Fork 37
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
View of View usage #1205
Comments
No it does not |
So does this work then because host mirror is not destructed when it falls out of scope but kept alive due to the inner views are still alive? |
@dalg24 in this case, what is the proper way to build a device-side view of views that needs to be recreated multiple times? Should we just be managing the memory ourselves? |
I wonder if we should just move to views of unmanaged views. I think this is essentially safe in all our use cases, since we use views of views only for pointing at variable data in packs (and for boundary stuff). That being said, I am not sure I fully understand the implications of 'SequentialHostInit'. |
Conceptual question: Our View of Views are mostly device/device and are initialized through a host mirror because we're not using a unified memory space (see https://kokkos.org/kokkos-core-wiki/ProgrammingGuide/View.html#i-really-want-a-view-of-views-what-do-i-do) , correct? (ping people who have been working on packs @Yurlungur @lroberts36 @brryan )
This view of view business in #1191 is driving me ...
To summarize my current understanding:
For a host/device view of views with the outer view in unified memory as in the Kokkos docs, we should pass the
SequentialHostInit
to the outer view so that the inner device views destructors are automatically called on the host (and not within a parallel region, which is illegal).For our device/device view of views we have the following situation with the basic pattern of
Therefore, when compiled on device:
SequentialHostInit
(because the outer view is on device and thus addingSequentialHostInit
is illegal)SequentialHostInit
SequentialHostInit
property)?Therefore, when compiled on host:
SequentialHostInit
(because the next step is no-op and addSequentialHostInit
there would be ignored)SequentialHostInit
Does this make sense? Or am I missing sth?
The text was updated successfully, but these errors were encountered: