Deprecate the DeviceNDArray class and public APIs that return instances#546
Deprecate the DeviceNDArray class and public APIs that return instances#546brandon-b-miller wants to merge 76 commits intoNVIDIA:mainfrom
DeviceNDArray class and public APIs that return instances#546Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
| @functools.wraps(func) | ||
| def wrapper(*args, **kwargs): | ||
| warnings.warn( | ||
| f"{func.__name__} api is deprecated. Please prefer cupy for array functions", |
There was a problem hiding this comment.
cupy arrays are much slower than DeviceNDArray because they require creating an external (i.e., non-numba-cuda-created) stream, so I'm not sure a recommendation for that is what we should do right now.
I was thinking that we can keep the top-level APIs (device_array etc.) and replace their internals with StridedMemoryView or something similar, in an effort to allow folks to as-cheaply-as-possible construct arrays.
There was a problem hiding this comment.
I concur that a light weight device array like container should exist, I'm just not sure that numba-cuda should necessarily be the library providing it publicly. I think we should nudge users away from using numba-cuda as such, like for moving data from host to device. That said, I'm open to suggestions on what we should recommend.
|
/ok to test |
1 similar comment
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |

Part of #471
DeprecatedNDArrayAPIWarningemitted from all user facing functions for moving data around (cuda.to_device, driver.host_to_device, device_to_host, also as_cuda_array, is_cuda_array, etcDeviceNDArrayctorDeviceNDArray._create_nowarn