How can I know the dist.recv buffer size?

I want to use dist.send and recv, How could I know the buffer size? How could I get the tensor size( instead of length)

send/recv should still use in spmd manner, so it’s user’s responsibility to construct the same sized tensor when receiving