Relative Content

Tag Archive for pythonparallel-processingmultiprocessingmatrix-multiplication

parallelization for large matrix multiplication

I am trying to understand something, here is the context. I have two very larges torch matrices :
A : (3 000 000, 20) and B : (20, 15 000) and i need to multiply them, and then two process each columns of the resulting matrix with a function f. In the beginning I tried to multiply the matrices using torch operator, but got a out of memory error, then i did a simple for loop to compute individually each A * B[:, i] and compute f of the result in the for loop, but it was very long.