You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extracting memory allocation from serialization #3970
Currently serialization handles memory allocation/transmission internally in a somewhat custom way. For example in tcp we allocate bytearrays, which we fill up with data received. Whereas for ucx, we use NumPy arrays (or bytearrays if NumPy isn't available) for host allocations and RMM (or Numba if RMM is not available) for device allocations. It would be useful to collect these allocations procedures into one common module. . This would also allow us to use them in other places where they may be important like spilling or even more specific utilities (like those used to merge/split frames). Should also help us to cutdown some code duplication between the ucx and tcp code paths and avoid bugs that may occur due to differences between these paths. Feedback on this thought would be welcome 🙂
I would be +1 on common module for allocation. Would you expect that if an error arises on the TCP side that someone would have to be knowledgable about UCX serialization as well to fix ?
@quasiben makes a great point I didn't consider initially. Maybe it would be risky to do that for now while we don't have tests that cover UCX more broadly, a change that works on TCP may completely break UCX. But if we find a way to test things, I'm +1 in unifying things.
Honestly I think this will be easier for us to test. As it is, it's not really easy or possible to test.
It depends, I understand it will make things easier for us to test as a whole, and most of us are testing when we change things in ucx.py, even though there aren't many tests in CI. What worries me is someone who's mostly unaware of UCX doing TCP-related changes that end up breaking UCX support.
We are already in the habit of reaching out to potentially affected parties when making changes. I don't think this will be too different. That said, I don't expect this to change much.
I'd be interested in seeing the performance improvement! Given all those allocator optimizations available through NumPy, it would be nice to get to use them.
Added PR ( #5750 ), which starts down this path. It is not as clean as a separate module atm. However it does provide a way to benefit from NumPy's faster allocations in TCP, which should address the issue seen in this comment ( #5258 (comment) ).
Activity
jakirkham commentedon Jul 27, 2020
Any thoughts here? 🙂
quasiben commentedon Jul 28, 2020
I would be +1 on common module for allocation. Would you expect that if an error arises on the TCP side that someone would have to be knowledgable about UCX serialization as well to fix ?
pentschev commentedon Jul 28, 2020
@quasiben makes a great point I didn't consider initially. Maybe it would be risky to do that for now while we don't have tests that cover UCX more broadly, a change that works on TCP may completely break UCX. But if we find a way to test things, I'm +1 in unifying things.
jakirkham commentedon Jul 28, 2020
Honestly I think this will be easier for us to test. As it is, it's not really easy or possible to test.
pentschev commentedon Jul 28, 2020
It depends, I understand it will make things easier for us to test as a whole, and most of us are testing when we change things in
ucx.py, even though there aren't many tests in CI. What worries me is someone who's mostly unaware of UCX doing TCP-related changes that end up breaking UCX support.jakirkham commentedon Jul 28, 2020
We are already in the habit of reaching out to potentially affected parties when making changes. I don't think this will be too different. That said, I don't expect this to change much.
jakirkham commentedon Aug 25, 2021
Would be happy to try a rough implementation of this if that would help move the discussion forward
cc @gjoseph92 @mrocklin (as it pertains to this perf gap)
gjoseph92 commentedon Aug 25, 2021
I'd be interested in seeing the performance improvement! Given all those allocator optimizations available through NumPy, it would be nice to get to use them.
jakirkham commentedon Feb 3, 2022
Added PR ( #5750 ), which starts down this path. It is not as clean as a separate module atm. However it does provide a way to benefit from NumPy's faster allocations in TCP, which should address the issue seen in this comment ( #5258 (comment) ).
jakirkham commentedon Feb 24, 2022
Resolved in PR ( #5750 )