diff --git a/ci/test_python_other.sh b/ci/test_python_other.sh index ade11b51c64..25ed615df84 100755 --- a/ci/test_python_other.sh +++ b/ci/test_python_other.sh @@ -44,4 +44,5 @@ pytest \ custreamz popd +rapids-logger "Test script exiting with value: $EXITCODE" exit ${EXITCODE} diff --git a/conda/recipes/cudf/meta.yaml b/conda/recipes/cudf/meta.yaml index 0d5b5d16e08..27073eb323b 100644 --- a/conda/recipes/cudf/meta.yaml +++ b/conda/recipes/cudf/meta.yaml @@ -72,6 +72,7 @@ requirements: - {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }} - nvtx >=0.2.1 - packaging + - ptxcompiler >=0.7.0 - cachetools - cubinlinker # CUDA enhanced compatibility. - cuda-python >=11.7.1,<12.0 diff --git a/python/cudf/cudf/__init__.py b/python/cudf/cudf/__init__.py index b86fb72d955..49fc0898fe2 100644 --- a/python/cudf/cudf/__init__.py +++ b/python/cudf/cudf/__init__.py @@ -91,10 +91,9 @@ # cuDF requires a stronger set of conditions than what is # checked by patch_numba_linker_if_needed due to the PTX # files needed for JIT Groupby Apply and string UDFs - from cudf.core.udf.groupby_utils import dev_func_ptx - from cudf.core.udf.utils import _setup_numba_linker + from cudf.core.udf.utils import _setup_numba_linker, ptx_file - _setup_numba_linker(dev_func_ptx) + _setup_numba_linker(ptx_file) del patch_numba_linker_if_needed diff --git a/python/cudf/cudf/core/udf/groupby_utils.py b/python/cudf/cudf/core/udf/groupby_utils.py index a1174835db9..dc31cf43292 100644 --- a/python/cudf/cudf/core/udf/groupby_utils.py +++ b/python/cudf/cudf/core/udf/groupby_utils.py @@ -1,6 +1,5 @@ # Copyright (c) 2022-2023, NVIDIA CORPORATION. -import os import cupy as cp import numpy as np @@ -22,16 +21,12 @@ from cudf.core.udf.utils import ( _get_extensionty_size, _get_kernel, - _get_ptx_file, _get_udf_return_type, _supported_cols_from_frame, _supported_dtypes_from_frame, ) from cudf.utils.utils import _cudf_nvtx_annotate -dev_func_ptx = _get_ptx_file(os.path.dirname(__file__), "function_") -cudf.core.udf.utils.ptx_files.append(dev_func_ptx) - def _get_frame_groupby_type(dtype, index_dtype): """ diff --git a/python/cudf/cudf/core/udf/utils.py b/python/cudf/cudf/core/udf/utils.py index 4bba4f123ed..1ae633c0a32 100644 --- a/python/cudf/cudf/core/udf/utils.py +++ b/python/cudf/cudf/core/udf/utils.py @@ -2,7 +2,7 @@ import glob import os -from typing import Any, Callable, Dict, List +from typing import Any, Callable, Dict import cachetools import cupy as cp @@ -64,7 +64,6 @@ MASK_BITSIZE = np.dtype("int32").itemsize * 8 precompiled: cachetools.LRUCache = cachetools.LRUCache(maxsize=32) -ptx_files: List[Any] = [] launch_arg_getters: Dict[Any, Any] = {} @@ -259,7 +258,7 @@ def _get_kernel(kernel_string, globals_, sig, func): globals_["f_"] = f_ exec(kernel_string, globals_) _kernel = globals_["_kernel"] - kernel = cuda.jit(sig, link=ptx_files, extensions=[str_view_arg_handler])( + kernel = cuda.jit(sig, link=[ptx_file], extensions=[str_view_arg_handler])( _kernel ) @@ -466,5 +465,4 @@ def column_to_string_view_array_init_heap(col): return column_to_string_view_array(col) -strings_ptx_file = _get_ptx_file(os.path.dirname(__file__), "shim_") -ptx_files.append(strings_ptx_file) +ptx_file = _get_ptx_file(os.path.dirname(__file__), "shim_")