Closed Yurlungur closed 2 months ago
Looking forward to this! I'll probably review tomorrow
A few big picture thoughts on serialization:
memcpy(dst, this, sizeof(*this))
works. Nested static arrays are okay, for the same reason they can be captured in a KOKKOS_LAMBDA
, nested pointers would not be.GetOnDevice
that creates a thread-local device-side databox. I think this is the preferred pattern and it's what will happen if you just naively call the API. (b) You can create shared device-side databoxes by creating an array of databox objects on device and then calling setPointer
to force them to share memory. I think this is best handled manually by user code, but spiner
supports it with the setPointer
method.Tests triggered on re-git.
Tests triggered on re-git.
tests pass.
PR Summary
Using tabulated data in, e.g., MPI Windows for shared memory requires the ability to serialize a
DataBox
object into pre-allocated shared memory and to build a new thread-local object around said shared memory, so that the object itself is thread-local but it internally points at a table that lives in shared memory. This PR implements this capability.This will be needed for the equivalent capability in
Singularity-EOS
and also provides a prototype for how that model and API will look.PR Checklist