-
Notifications
You must be signed in to change notification settings - Fork 12
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
Replace buffer tracking with serialization inspection #301
base: master
Are you sure you want to change the base?
Conversation
I think this is ready. However, we can only achieve such introspection using the madness archive. With boost, we would have to specialize traits on the inspector archive, which is not possible because the inspector archive is templated on the callable. Even if we were to type-erase the callable into I don't think this is an issue. Moving from boost to madness serialization is not hard and users have to touch their data structures anyway to integrate buffers. More reliance on madness though, at least for the time being. |
Nevermind, not ready yet. This requires ICLDisco/parsec#695 to land in PaRSEC. Reverted back to draft. |
d84ae7b
to
99dd848
Compare
da4545c
to
f23639d
Compare
We have been tracking the buffers of structures by having the buffer register itself with some metadata. This is clumsy and error-prone (no support for nesting, for example). Now we use a specialized archive to inspect all members of a value and apply some functor to each buffer (or its internal parsec data). This is also the first step towards a structure derived from parsec_data_copy_t to better manage the life-time of the host copy. We now only allow shared_ptr for non-owning buffers so some adjustments must be made by users. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
We cannot use boost serialization to inspect objects for the buffers they contain because boost archives cannot be templated properly and need explicit instantiations for its archives, which is impossible for the BufferInspectorArchive. We just rely on madness from now on. Signed-off-by: Joseph Schuchart <[email protected]>
For now only allow T[] on smart pointers passed to buffers. We may want to support both T and T[] on ttg::Buffer so we can distinguish the two later. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
The data copy will call deallocate no matter what, so be graceful. We will still catch cases where we try to allocate through the empty allocator. Signed-off-by: Joseph Schuchart <[email protected]>
We can now inspect the buffers of the tile to extract its memory regions. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
This allows us to mark buffers as allocate-only. SyncIn is the default. Ignored in the MANDESS backend. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
f23639d
to
04b67fd
Compare
Signed-off-by: Joseph Schuchart <[email protected]>
So we can delay evaluation until the derived struct has been populated. Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
Signed-off-by: Joseph Schuchart <[email protected]>
We have been tracking the buffers of structures by having the buffer register itself with some metadata. This is clumsy and error-prone (no support for nesting, for example). Now we use a specialized archive to inspect all members of a value and apply some functor to each buffer (or its internal parsec data).
This is also the first step towards a structure derived from parsec_data_copy_t to better manage the life-time of the host copy. We now only allow shared_ptr for non-owning buffers so some adjustments must be made by users.