Closed fabian-jung closed 3 months ago
Here are some test cases: https://gist.github.com/fabian-jung/1f07b57891db091ba48185c675c8a589
I added the transitive version of the buffer adapter for std::vector. For the moment it is only in the cracen repo, but i will add it to the pull request if you want.
push
I am currently working a little more on the serialization topic / serialization policy which has something in common with your approach.Your buffer need to be used in all p2p and collective operations. Give me some time to stabilize this in my mind. Do you have some time constraints when this needs to be merged?
If i understand it correctly, you suggest to alter the cage, rather than the communication policy?
I would totally do this in the cage methods and extend the communication policy interface by a probing method.
Currently, i experimenting with your code and try to make a buffer adapter for std::array<std::tuple<unsigned, std::string>, 1>
(because one example is using it. Would this be a use case for the transitiv buffer adapter ?
What is the status of this pull request?
The BufferAdapter is working for non transitive use cases. I found the transitive extension to be too complex for the little benefit it offers.
The integration in graybat is not done, but should be a very easy, now the probe() is implemented. After i am back from the hackathon, i can do that. The api of graybat is not affected.
If std::vector
Does the BytePack Seriallization policy resize a vector, if received via the cage?
It does not resize the vector, since it is a serialization policy which serializes data. We had an offline discussion about resizing a container. My idea was to provide a function which does the resizing instead of injecting cage logic into the serialization policy. We should continue the discussion here.
This is not the final solution, but i dont know, where to start to hook things up in graybat. Where i am at is, that i can convert a Type to a void* and size and back. I know, that you are using memcpy in the background, to copy the messages to the send buffers and from the receive buffer. Since there are specilised implementations for non trivial copyable types, these specialisations take care of resizing the input types if needed.
Now all I need to know, is all places in the communication policies, where this is done to make a clean transition. Maybe we can tackle this on the cage layer but i am not sure about this.