diff --git a/conda/recipes/cudf/recipe.yaml b/conda/recipes/cudf/recipe.yaml index 955406058f10..3fe6397c6f68 100644 --- a/conda/recipes/cudf/recipe.yaml +++ b/conda/recipes/cudf/recipe.yaml @@ -91,6 +91,9 @@ requirements: - pandas >=3.0.0,<3.1.0 - cupy >=13.6.0,!=14.0.0,!=14.1.0 - numba-cuda >=0.22.2 + # TODO: add `numba-cuda-mlir >=0.3.0` here once it is published to a conda + # channel. Currently only available via PyPI; the pip-only declaration + # lives in `dependencies.yaml::depends_on_numba_cuda_mlir`. - numba >=0.60.0,<0.65.0 - numpy >=1.26,<3.0 - pyarrow>=19.0.0 diff --git a/dependencies.yaml b/dependencies.yaml index 9f0044b26682..c2e4af468d4b 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -26,6 +26,7 @@ files: - depends_on_librapidsmpf - depends_on_libucxx - depends_on_numba_cuda + - depends_on_numba_cuda_mlir - depends_on_rapids_logger - depends_on_rapidsmpf - depends_on_ray @@ -90,6 +91,7 @@ files: - depends_on_pylibcudf - depends_on_libcudf - depends_on_numba_cuda + - depends_on_numba_cuda_mlir test_python_pylibcudf: output: none includes: @@ -203,6 +205,7 @@ files: - depends_on_cupy - depends_on_libcudf - depends_on_numba_cuda + - depends_on_numba_cuda_mlir - depends_on_pylibcudf_pyarrow - depends_on_rmm - depends_on_cuda_python @@ -1177,6 +1180,30 @@ dependencies: - matrix: packages: - *numba_cuda + depends_on_numba_cuda_mlir: + # numba-cuda-mlir is the MLIR-based numba-cuda compiler used by the cudf + # UDF backend. Currently only published to PyPI; conda packaging is a + # tracked feature request (see TODOs in conda/recipes/cudf/recipe.yaml). + # Once a conda package exists, add an `output_types: [conda]` entry here + # mirroring `depends_on_numba_cuda`. + specific: + - output_types: [requirements, pyproject] + matrices: + - matrix: + cuda: "12.*" + cuda_suffixed: "true" + packages: + - numba-cuda-mlir[cu12]>=0.3.0 + - matrix: + cuda: "13.*" + cuda_suffixed: "true" + packages: + - numba-cuda-mlir[cu13]>=0.3.0 + # fallback to numba-cuda-mlir with no extra CUDA packages if + # 'cuda_suffixed' isn't true + - matrix: + packages: + - numba-cuda-mlir>=0.3.0 depends_on_pylibcudf: common: - output_types: conda diff --git a/python/cudf/cudf/core/udf/mlir_backend/__init__.py b/python/cudf/cudf/core/udf/mlir_backend/__init__.py new file mode 100644 index 000000000000..5fd27ebc19ad --- /dev/null +++ b/python/cudf/cudf/core/udf/mlir_backend/__init__.py @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. +# SPDX-License-Identifier: Apache-2.0 +"""MLIR / numba_cuda_mlir UDF backend namespace, empty for now.""" diff --git a/python/cudf/cudf/tests/private_objects/mlir_backend/__init__.py b/python/cudf/cudf/tests/private_objects/mlir_backend/__init__.py new file mode 100644 index 000000000000..8eca3cc68ad4 --- /dev/null +++ b/python/cudf/cudf/tests/private_objects/mlir_backend/__init__.py @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. +# SPDX-License-Identifier: Apache-2.0 diff --git a/python/cudf/cudf/tests/private_objects/mlir_backend/test_plumbing.py b/python/cudf/cudf/tests/private_objects/mlir_backend/test_plumbing.py new file mode 100644 index 000000000000..4acd532fe875 --- /dev/null +++ b/python/cudf/cudf/tests/private_objects/mlir_backend/test_plumbing.py @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. +# SPDX-License-Identifier: Apache-2.0 +import pytest + +pytest.importorskip("numba_cuda_mlir") + + +def test_mlir_backend_package_importable(): + import cudf.core.udf.mlir_backend as m + + # Module is intentionally empty at this layer, only the docstring + # is present. + assert m.__doc__ diff --git a/python/cudf/pyproject.toml b/python/cudf/pyproject.toml index 199be2f0521f..aa8d7b2470c4 100644 --- a/python/cudf/pyproject.toml +++ b/python/cudf/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ "cupy-cuda13x>=13.6.0,!=14.0.0,!=14.1.0", "fsspec>=0.6.0", "libcudf==26.8.*,>=0.0.0a0", + "numba-cuda-mlir>=0.3.0", "numba-cuda>=0.22.2", "numba>=0.60.0,<0.65.0", "numpy>=1.26,<3.0",