-
Notifications
You must be signed in to change notification settings - Fork 19
Description
As of right now, there are three pip install
packages which one can use to install cupy: cupy
which will build cupy from source and the two prebuild versions cupy-cuda12x
and cupy-cuda11x
.
This library only allows for cupy
to be installed. This clashes with other libraries, e.g. cucim, which only allows installing with prebuild options.
Also, having only the source building cupy
option available introduces the risk of build-failures on systems which would work fine with the prebuild ones and costs time when installing this library.
Therefore, I would like to present two possible solutions.
First: Remove cupy dependency completely and change the installation instructions that the user must cupy by themselves.
Second: Remove cupy dependency from the dependency list and introduce 3 new optional dependencies:
pyproject.toml
:
...
dependencies = [
"cupy",
"xarray>=2024.02.0",
]
[project.optional-dependencies]
test = [
"dask",
"pytest",
]
source = [
"cupy"
]
cuda12 = [
"cupy-cuda12x",
]
cuda11 = [
"cupy-cuda11x",
]
...
That way, a user can install this library with e.g. pip install cupy-xarray[cuda12]
I would welcome any feedback and other ideas on this. If you make a decision about this, I would be happy to implement it and open a pull request.