Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support numba-cuda>=0.0.18 #17359

Open
wants to merge 3 commits into
base: branch-24.12
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies:
- nbsphinx
- ninja
- notebook
- numba-cuda>=0.0.13,<0.0.18
- numba-cuda>=0.0.18
- numpy>=1.23,<3.0a0
- numpydoc
- nvcc_linux-64=11.8
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies:
- nbsphinx
- ninja
- notebook
- numba-cuda>=0.0.13,<0.0.18
- numba-cuda>=0.0.18
- numpy>=1.23,<3.0a0
- numpydoc
- nvcomp==4.1.0.6
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- cachetools
- &numba-cuda-dep numba-cuda>=0.0.13,<0.0.18
- &numba-cuda-dep numba-cuda>=0.0.18
- nvtx>=0.2.1
- packaging
- rich
Expand Down Expand Up @@ -794,7 +794,7 @@ dependencies:
- pandas==2.0.*
- matrix: {dependencies: "latest"}
packages:
- numba-cuda==0.0.15
- numba-cuda>=0.0.18
- pandas==2.2.3
- matrix:
packages:
Expand Down
3 changes: 1 addition & 2 deletions python/cudf/cudf/_lib/aggregation.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pylibcudf

import cudf
from cudf._lib.types import SUPPORTED_NUMPY_TO_PYLIBCUDF_TYPES
from cudf.utils import cudautils

_agg_name_map = {
"COUNT_VALID": "COUNT",
Expand Down Expand Up @@ -196,7 +195,7 @@ class Aggregation:
# Handling UDF type
nb_type = numpy_support.from_dtype(kwargs['dtype'])
type_signature = (nb_type[:],)
ptx_code, output_dtype = cudautils.compile_udf(op, type_signature)
ptx_code, output_dtype = cudf.utils.cudautils.compile_udf(op, type_signature)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config setting needs to be in place before numba.cuda is imported, which otherwise happens here during cython import

output_np_dtype = cudf.dtype(output_dtype)
if output_np_dtype not in SUPPORTED_NUMPY_TO_PYLIBCUDF_TYPES:
raise TypeError(f"Result of window function has unsupported dtype {op[1]}")
Expand Down
4 changes: 1 addition & 3 deletions python/cudf/cudf/utils/_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ def _setup_numba():
if driver_version < (12, 0):
patch_numba_linker_cuda_11()
else:
from pynvjitlink.patch import patch_numba_linker

patch_numba_linker()
numba_config.CUDA_ENABLE_PYNVJITLINK = True


class _CUDFNumbaConfig:
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"cupy-cuda11x>=12.0.0",
"fsspec>=0.6.0",
"libcudf==24.12.*,>=0.0.0a0",
"numba-cuda>=0.0.13,<0.0.18",
"numba-cuda>=0.0.18",
"numpy>=1.23,<3.0a0",
"nvtx>=0.2.1",
"packaging",
Expand Down
2 changes: 1 addition & 1 deletion python/dask_cudf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cudf = "dask_cudf.backends:CudfDXBackendEntrypoint"
[project.optional-dependencies]
test = [
"dask-cuda==24.12.*,>=0.0.0a0",
"numba-cuda>=0.0.13,<0.0.18",
"numba-cuda>=0.0.18",
"pytest-cov",
"pytest-xdist",
"pytest<8",
Expand Down
Loading