Skip to content

Commit

Permalink
Merge branch 'branch-0.41' into remove-endpoint-reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev authored Nov 4, 2024
2 parents 25f5a19 + 07db627 commit 49be57c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 0 additions & 2 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set -euo pipefail

rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string

rapids-print-env
Expand Down
14 changes: 8 additions & 6 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ skip = [

[tool.pytest.ini_options]
xfail_strict = true
addopts = "--tb=native"

[tool.rapids-build-backend]
build-backend = "setuptools.build_meta"
Expand Down
15 changes: 8 additions & 7 deletions ucp/_libs/arr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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

Expand Down Expand Up @@ -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(
(<PyObject*>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 = <char*>PyMem_Malloc(n * sizeof(Py_ssize_t))
a.callback_free_data = PyMem_Free
return a


@auto_pickle(False)
Expand Down

0 comments on commit 49be57c

Please sign in to comment.