Does Ray accelerate matrix multiplication?

Low: It annoys or frustrates me for a moment.


If I multiply two numpy arrays, will Ray accelerate the computation?

Some Details

I have one node with 20 CPUs. I am considering using a python script with numpy matrix multiplication (which presumably just uses one CPU) vs using Ray to do matrix multiplication.

I know Ray is great at reducing memory using zero-copy reads, but I would like to know if it speeds up the calculation too.

cc @Clark_Zinzow do you know what’s the best solution for this now?

@xzf0kgb0bqr.cev2RWU NumPy should already use BLAS under-the-hood which will already be very fast, and I believe that you can have NumPy parallelize matrix multiplication over multiple cores by setting the OMP_NUM_THREADS environment variable, e.g. OMP_NUM_THREADS=20. I think that this will probably give you better performance than manually partitioning your matrix and doing your own parallel matrix multiplication on Ray, and if you’re having difficulties saturating your CPU resources on your machine with NumPy, then your next best bet is probably using a BLAS library directly, e.g. scipy.linalg.blas.sgemm(...).

Some links: