Search code examples
pythonnumpyscipysparse-matrixgil

Do scipy.sparse functions release the GIL?


Question

Do scipy.sparse functions, like csr._mul_matvec release the GIL?

Context

Python functions that wrap foreign code (like C) often release the GIL during execution, enabling parallelism with multi-threading. This is common in the numpy codebase. Is it also common in scipy.sparse? If so which operations release the GIL? If they don't release the GIL then is there a fundamental issue here why not or is it just lack of man-power?


Solution

  • They do, for Scipy versions >= 0.14.0