diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df6e0b46..dcd83501 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - --fix - --rapids-version=24.12 - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.13.11 + rev: v1.16.0 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/ci/build_python.sh b/ci/build_python.sh index 1e423cc1..2fdcd640 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -5,8 +5,6 @@ set -euo pipefail rapids-configure-conda-channels -source rapids-configure-sccache - source rapids-date-string rapids-print-env diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 7db292dd..f3f69ddd 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -3,17 +3,19 @@ set -euo pipefail -package_name="ucx-py" -underscore_package_name=$(echo "${package_name}" | tr "-" "_") - -source rapids-configure-sccache source rapids-date-string rapids-generate-version > ./VERSION RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -python -m pip wheel . -w dist --no-deps --disable-pip-version-check --config-settings rapidsai.disable-cuda=false +python -m pip wheel \ + -v \ + -w dist \ + --no-deps \ + --disable-pip-version-check \ + --config-settings rapidsai.disable-cuda=false \ + . mkdir -p final_dist python -m auditwheel repair \ @@ -25,4 +27,4 @@ python -m auditwheel repair \ --exclude "libuct.so.0" \ dist/* -RAPIDS_PY_WHEEL_NAME="${underscore_package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist +RAPIDS_PY_WHEEL_NAME="ucx_py_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 python final_dist diff --git a/pyproject.toml b/pyproject.toml index 654091b6..c616b71a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,6 +109,7 @@ skip = [ [tool.pytest.ini_options] xfail_strict = true +addopts = "--tb=native" [tool.rapids-build-backend] build-backend = "setuptools.build_meta" diff --git a/ucp/_libs/arr.pyx b/ucp/_libs/arr.pyx index 1f2130f1..635d897c 100644 --- a/ucp/_libs/arr.pyx +++ b/ucp/_libs/arr.pyx @@ -4,13 +4,12 @@ # cython: language_level=3 -from cpython.array cimport array, newarrayobject from cpython.buffer cimport PyBuffer_IsContiguous +from cpython.mem cimport PyMem_Free, PyMem_Malloc from cpython.memoryview cimport ( PyMemoryView_FromObject, PyMemoryView_GET_BUFFER, ) -from cpython.object cimport PyObject from cpython.ref cimport Py_INCREF from cpython.tuple cimport PyTuple_New, PyTuple_SET_ITEM from cython cimport ( @@ -20,6 +19,7 @@ from cython cimport ( nonecheck, wraparound, ) +from cython.view cimport array from libc.stdint cimport uintptr_t from libc.string cimport memcpy @@ -62,13 +62,14 @@ cdef dict itemsize_mapping = { } -cdef array array_Py_ssize_t = array("q") +cdef sizeof_Py_ssize_t = sizeof(Py_ssize_t) -cdef inline Py_ssize_t[::1] new_Py_ssize_t_array(Py_ssize_t n): - return newarrayobject( - (array_Py_ssize_t).ob_type, n, array_Py_ssize_t.ob_descr - ) +cdef Py_ssize_t[::1] new_Py_ssize_t_array(Py_ssize_t n): + cdef array a = array((n,), sizeof_Py_ssize_t, b"q", "c", False) + a.data = PyMem_Malloc(n * sizeof(Py_ssize_t)) + a.callback_free_data = PyMem_Free + return a @auto_pickle(False)