I have a use case where I have to pass huge numpy arrays to and from actors and speed is critical. Most of the communication is between 1 main process used to launch actors and N actors.
I believe ray has optimizations for handling numpy arrays because it uses Apache Arrow under the hood (correct me if I am wrong).
Right now I just feed in/out np.array() objects.
-
Do I need to do anything special to make sure ray is using the fastest method to pass around numpy arrays? Or does it recognize I am using np.array(), and optimizes accordingly?
-
Note that for some communication channels I know the size of the arrays and for some I don’t. Is it possible to preallocate memory for the arrays that I know the size of?
Thanks!