conda-forge / scipy-feedstock

A conda-smithy repository for scipy.
BSD 3-Clause "New" or "Revised" License
6 stars 36 forks source link

Supporting CUDA-enabled SciPy #261

Closed jakirkham closed 11 months ago

jakirkham commented 11 months ago

SciPy has recently started adding support for CUDA in the library. For example: https://github.com/scipy/scipy/pull/19601

Given this, wanted to raise this topic to discuss how we might provide this functionality to users

rgommers commented 11 months ago

Eh, not quite. That C++ code now works on CUDA, but the intent is to make that as easy as possible to use by CuPy & co, so special function support on GPUs can become more mature. There is no intent to have nontrivial CUDA code directly in SciPy or ship SciPy binaries that directly depend on CUDA.

jakirkham commented 11 months ago

Right wasn't imagining that SciPy would start writing CUDA kernels or anything

So is the idea that CuPy would #include these headers from SciPy?

Would SciPy builds be unchanged?

rgommers commented 11 months ago

I think CuPy should vendor them, there is no plan (at least for now) to have an officially supported header-only interface nor perfect backwards compatibility guarantees for these headers (they're purely internal and only the Python APIs in scipy.special that rely on them are tested).

There's more discussion on that in https://github.com/scipy/scipy/issues/19404, but it basically amounts to what I wrote above.

rgommers commented 11 months ago

Would SciPy builds be unchanged?

Indeed.

jakirkham commented 11 months ago

Ok sounds like there is no action to take here then. Can always revisit if that changes

Thanks Ralf! 🙏