You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to make numpy an optional dependency for cuda.core? For example, if you just want to use cuda.core to query system device properties, installing a BLAS implementation is a bit heavy.
+1 it looks like our numpy usage outside of tests, benchmarks, and examples is only related to dtypes where we should be able to make it handle numpy dtypes optionally
Very unlikely. We use NumPy heavily in cuda-core (and nvmath-python and the upstream Numba): https://github.com/search?q=repo%3ANVIDIA%2Fcuda-python+numpy+path%3Acuda_core%2Fcuda&type=code
Without assuming NumPy exists it is really challenging to write interoperable code. We'd end up reinventing a whole set of infra as done in mpi4py. In a modern workload NumPy always exists somewhere, so I don't get where this is coming from?
Activity
kkraus14 commentedon Mar 13, 2025
+1 it looks like our numpy usage outside of tests, benchmarks, and examples is only related to dtypes where we should be able to make it handle numpy dtypes optionally
leofang commentedon Mar 13, 2025
Very unlikely. We use NumPy heavily in cuda-core (and nvmath-python and the upstream Numba):
https://github.com/search?q=repo%3ANVIDIA%2Fcuda-python+numpy+path%3Acuda_core%2Fcuda&type=code
Without assuming NumPy exists it is really challenging to write interoperable code. We'd end up reinventing a whole set of infra as done in mpi4py. In a modern workload NumPy always exists somewhere, so I don't get where this is coming from?
leofang commentedon Mar 13, 2025
FWIW we don't even set a version constraint on NumPy as suggested by NEP 29/Spec 0, only that it exists in the user env:
cuda-python/cuda_core/pyproject.toml
Lines 45 to 47 in f903d98