NVIDIA Numba-CUDA
Closed this issue · 3 comments
Currently, STUMPY uses from numba import cuda that comes directly with numba. However, @gmarkall had informed us that the numba.cuda module is moving to a separate package maintained by NVIDIA.
Earlier tests back in August 2024 showed that this worked in STUMPY without any code changes, which is great!
While it is possible that we may never (or rarely) benefit from the new NVIDIA features, it may still be relevant to recommend (in the form of a warning) that the user upgrade to numba-cuda where applicable. STUMPY has always maintained a limited set of package dependencies and so this issue is here to track what we might want to do OR if there is anything to be done altogether.
At present, our GPU code is very stable and only sees minor infrequent changes. I wonder if there is a way to identify when/where in the code numba-cuda would provide better performance than the in-built numba.cuda and then, in those instances, warn the user that they could try using numba-cuda for better performance?
Frankly, I don't know if this effort is even warranted.
Numba will probably inform the user that they ought to use Numba-CUDA independently of STUMPY anyway, so I think it's probably most straightforward for you to not handle this specially in STUMPY. The current wording I have is at https://github.com/numba/numba/pull/10138/files#diff-277ef6bcb994d739fb7de5dc5d2c8846cbcbd6423e0feaaa73365e0a44ff75f0R12-R17
no_spec_msg = (
"The NVIDIA-maintained CUDA target (the `numba_cuda` module) has not been "
"found. Falling back to the built-in CUDA target. The NVIDIA-maintained "
"target should be installed - see https://numba.readthedocs.io/en/stable/cuda/overview.html#cuda-deprecation-status"
" - for installation instructions, see https://nvidia.github.io/numba-cuda/user/installation.html"
)