From 46e8f577eff852696ebc0da8015925b9b5682f26 Mon Sep 17 00:00:00 2001 From: Ray Douglass Date: Thu, 19 Sep 2024 11:45:35 -0400 Subject: [PATCH 1/7] DOC v0.41 Updates [skip ci] --- .github/workflows/build.yaml | 8 ++++---- .github/workflows/pr.yaml | 12 ++++++------ .github/workflows/test.yaml | 4 ++-- .pre-commit-config.yaml | 2 +- VERSION | 2 +- dependencies.yaml | 6 +++--- pyproject.toml | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bd27709f..d9fcf10a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: conda-python-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -37,7 +37,7 @@ jobs: upload-conda: needs: [conda-python-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -45,7 +45,7 @@ jobs: sha: ${{ inputs.sha }} wheel-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -55,7 +55,7 @@ jobs: wheel-publish: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 1b00debe..66b52cc7 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,34 +18,34 @@ jobs: - wheel-build - wheel-tests secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.12 checks: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12 conda-python-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 with: build_type: pull-request container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000" wheel-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 with: build_type: pull-request script: ci/build_wheel.sh wheel-tests: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 with: build_type: pull-request script: ci/test_wheel.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b00e932c..b3f2ca3a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-python-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 with: build_type: nightly branch: ${{ inputs.branch }} @@ -25,7 +25,7 @@ jobs: container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000" wheel-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfe79e13..df6e0b46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: verify-alpha-spec args: - --fix - - --rapids-version=24.10 + - --rapids-version=24.12 - repo: https://github.com/rapidsai/dependency-file-generator rev: v1.13.11 hooks: diff --git a/VERSION b/VERSION index 9b0025a7..72a8a631 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.40.0 +0.41.0 diff --git a/dependencies.yaml b/dependencies.yaml index ac9a4b78..333c499c 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -225,7 +225,7 @@ dependencies: - pytest-rerunfailures - output_types: [conda] packages: - - &cudf_unsuffixed cudf==24.10.*,>=0.0.0a0 + - &cudf_unsuffixed cudf==.*,>=0.0.0a0 specific: - output_types: [requirements, pyproject] matrices: @@ -233,12 +233,12 @@ dependencies: cuda: "12.*" cuda_suffixed: "true" packages: - - cudf-cu12==24.10.*,>=0.0.0a0 + - cudf-cu12==.*,>=0.0.0a0 - matrix: cuda: "11.*" cuda_suffixed: "true" packages: - - cudf-cu11==24.10.*,>=0.0.0a0 + - cudf-cu11==.*,>=0.0.0a0 - matrix: packages: - *cudf_unsuffixed diff --git a/pyproject.toml b/pyproject.toml index e3a7e7b1..c854e42b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ classifiers = [ [project.optional-dependencies] test = [ "cloudpickle", - "cudf==24.10.*,>=0.0.0a0", + "cudf==.*,>=0.0.0a0", "cupy-cuda12x>=12.0.0", "dask", "distributed", From a8a4b67a5ab825aff92cc8f6457bd972972ef45b Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Tue, 24 Sep 2024 08:45:30 +0200 Subject: [PATCH 2/7] Fix dependencies and release script (#1073) This should allow builds to succeed. Authors: - Peter Andreas Entschev (https://github.com/pentschev) Approvers: - Ray Douglass (https://github.com/raydouglass) URL: https://github.com/rapidsai/ucx-py/pull/1073 --- ci/release/update-version.sh | 8 ++++---- dependencies.yaml | 6 +++--- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 7eaf0161..b6fa1a34 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -27,8 +27,8 @@ NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR} NEXT_RAPIDS_SHORT_TAG="$(curl -sL https://version.gpuci.io/ucx-py/${NEXT_SHORT_TAG})" # Need to distutils-normalize the versions for some use cases -NEXT_RAPIDS_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_RAPIDS_SHORT_TAG}'))") -NEXT_RAPIDS_FULL_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_FULL_TAG}'))") +NEXT_RAPIDS_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_RAPIDS_SHORT_TAG}'))") +NEXT_RAPIDS_FULL_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_FULL_TAG}'))") echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG" @@ -42,9 +42,9 @@ DEPENDENCIES=( ) for DEP in "${DEPENDENCIES[@]}"; do for FILE in dependencies.yaml conda/environments/*.yml; do - sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" + sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_RAPIDS_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" done - sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" pyproject.toml + sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_RAPIDS_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" pyproject.toml done for FILE in .github/workflows/*.yaml; do diff --git a/dependencies.yaml b/dependencies.yaml index 333c499c..86ef4c25 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -225,7 +225,7 @@ dependencies: - pytest-rerunfailures - output_types: [conda] packages: - - &cudf_unsuffixed cudf==.*,>=0.0.0a0 + - &cudf_unsuffixed cudf==24.12.*,>=0.0.0a0 specific: - output_types: [requirements, pyproject] matrices: @@ -233,12 +233,12 @@ dependencies: cuda: "12.*" cuda_suffixed: "true" packages: - - cudf-cu12==.*,>=0.0.0a0 + - cudf-cu12==24.12.*,>=0.0.0a0 - matrix: cuda: "11.*" cuda_suffixed: "true" packages: - - cudf-cu11==.*,>=0.0.0a0 + - cudf-cu11==24.12.*,>=0.0.0a0 - matrix: packages: - *cudf_unsuffixed diff --git a/pyproject.toml b/pyproject.toml index c854e42b..654091b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ classifiers = [ [project.optional-dependencies] test = [ "cloudpickle", - "cudf==.*,>=0.0.0a0", + "cudf==24.12.*,>=0.0.0a0", "cupy-cuda12x>=12.0.0", "dask", "distributed", From 805440f6d36ded496bbe47d510e4bc5f41bc5104 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 11 Oct 2024 09:14:51 -0500 Subject: [PATCH 3/7] make conda installs in CI stricter (#1082) Contributes to https://github.com/rapidsai/build-planning/issues/106 Proposes specifying the RAPIDS version in `conda install` calls that install CI artifacts, to reduce the risk of CI jobs picking up artifacts from other releases. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Kyle Edwards (https://github.com/KyleFromNVIDIA) URL: https://github.com/rapidsai/ucx-py/pull/1082 --- ci/test_python.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/test_python.sh b/ci/test_python.sh index c42fb613..c3e7acdf 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -9,6 +9,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../ rapids-logger "Create test conda environment" . /opt/conda/etc/profile.d/conda.sh +UCX_PY_VERSION="$(head -1 ./VERSION)" + rapids-dependency-file-generator \ --output conda \ --file-key test_python \ @@ -50,7 +52,7 @@ PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) rapids-mamba-retry install \ --channel "${PYTHON_CHANNEL}" \ - ucx-py + "ucx-py=${UCX_PY_VERSION}" rapids-logger "Run tests with conda package" run_tests From 210ebef36f00f78328770dedacc0d4255332c13c Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 16 Oct 2024 02:08:57 -0700 Subject: [PATCH 4/7] Sync some changes from KvikIO's `Array` (#1080) Pulls in a few changes from KvikIO's `Array`. Namely... * `asarray` for easy conversion to `Array` (no-op if already an `Array`) * Include types for a few more properties Authors: - https://github.com/jakirkham Approvers: - Peter Andreas Entschev (https://github.com/pentschev) - Lawrence Mitchell (https://github.com/wence-) URL: https://github.com/rapidsai/ucx-py/pull/1080 --- ucp/_libs/arr.pxd | 5 ++++- ucp/_libs/arr.pyi | 17 ++++++++++++++--- ucp/_libs/arr.pyx | 21 ++++++++++++++++++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ucp/_libs/arr.pxd b/ucp/_libs/arr.pxd index baa6a98e..16367cb8 100644 --- a/ucp/_libs/arr.pxd +++ b/ucp/_libs/arr.pxd @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. # cython: language_level=3 @@ -24,3 +24,6 @@ cdef class Array: cpdef bint _f_contiguous(self) cpdef bint _contiguous(self) cpdef Py_ssize_t _nbytes(self) + + +cpdef Array asarray(obj) diff --git a/ucp/_libs/arr.pyi b/ucp/_libs/arr.pyi index 2053179e..d2ba4798 100644 --- a/ucp/_libs/arr.pyi +++ b/ucp/_libs/arr.pyi @@ -1,7 +1,12 @@ -from typing import Tuple +# Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved. +# See file LICENSE for terms. -class Array: - def __init__(self, obj: object): ... +from typing import Generic, Tuple, TypeVar + +T = TypeVar("T") + +class Array(Generic[T]): + def __init__(self, obj: T): ... @property def c_contiguous(self) -> bool: ... @property @@ -14,3 +19,9 @@ class Array: def shape(self) -> Tuple[int]: ... @property def strides(self) -> Tuple[int]: ... + @property + def cuda(self) -> bool: ... + @property + def obj(self) -> T: ... + +def asarray(obj) -> Array: ... diff --git a/ucp/_libs/arr.pyx b/ucp/_libs/arr.pyx index 1937e7bb..0c332ef3 100644 --- a/ucp/_libs/arr.pyx +++ b/ucp/_libs/arr.pyx @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2020-2024, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. # cython: language_level=3 @@ -297,3 +297,22 @@ cdef inline Py_ssize_t _nbytes(Py_ssize_t itemsize, for i in range(ndim): nbytes *= shape_mv[i] return nbytes + + +cpdef Array asarray(obj): + """Coerce other objects to ``Array``. No-op for existing ``Array``s. + + Parameters + ---------- + obj: object + Object exposing the Python buffer protocol or ``__cuda_array_interface__``. + + Returns + ------- + array: Array + An instance of the ``Array`` class. + """ + if isinstance(obj, Array): + return obj + else: + return Array(obj) From fd87703d4202c7272433f0a273ea787635920d9a Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 21 Oct 2024 13:32:37 -0700 Subject: [PATCH 5/7] Mark all `nogil` `cdef` functions as `noexcept` (#1085) These are all pure C functions implemented in Cython. They do not raise. Cython 3 adds checks for exceptions in these functions, which is unnecessary given none of these set exceptions. So add `noexcept` to turn off these Cython checks. xref: https://github.com/rapidsai/kvikio/pull/502 Authors: - https://github.com/jakirkham Approvers: - Peter Andreas Entschev (https://github.com/pentschev) URL: https://github.com/rapidsai/ucx-py/pull/1085 --- ucp/_libs/arr.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ucp/_libs/arr.pyx b/ucp/_libs/arr.pyx index 0c332ef3..1f2130f1 100644 --- a/ucp/_libs/arr.pyx +++ b/ucp/_libs/arr.pyx @@ -245,7 +245,7 @@ cdef class Array: cdef inline bint _c_contiguous(Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t[::1] shape_mv, - Py_ssize_t[::1] strides_mv) nogil: + Py_ssize_t[::1] strides_mv) noexcept nogil: cdef Py_ssize_t i, s if strides_mv is not None: s = itemsize @@ -263,7 +263,7 @@ cdef inline bint _c_contiguous(Py_ssize_t itemsize, cdef inline bint _f_contiguous(Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t[::1] shape_mv, - Py_ssize_t[::1] strides_mv) nogil: + Py_ssize_t[::1] strides_mv) noexcept nogil: cdef Py_ssize_t i, s if strides_mv is not None: s = itemsize @@ -279,7 +279,7 @@ cdef inline bint _f_contiguous(Py_ssize_t itemsize, cdef inline bint _contiguous(Py_ssize_t itemsize, Py_ssize_t ndim, Py_ssize_t[::1] shape_mv, - Py_ssize_t[::1] strides_mv) nogil: + Py_ssize_t[::1] strides_mv) noexcept nogil: cdef bint r = _c_contiguous(itemsize, ndim, shape_mv, strides_mv) if not r: r = _f_contiguous(itemsize, ndim, shape_mv, strides_mv) @@ -292,7 +292,7 @@ cdef inline bint _contiguous(Py_ssize_t itemsize, @wraparound(False) cdef inline Py_ssize_t _nbytes(Py_ssize_t itemsize, Py_ssize_t ndim, - Py_ssize_t[::1] shape_mv) nogil: + Py_ssize_t[::1] shape_mv) noexcept nogil: cdef Py_ssize_t i, nbytes = itemsize for i in range(ndim): nbytes *= shape_mv[i] From 8344594117b7972a8a370c6559d1da7b33418bed Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 21 Oct 2024 23:34:44 -0700 Subject: [PATCH 6/7] Use Miniforge path in UCX debugging example (#1086) Changes the example output here to use Miniforge. Authors: - https://github.com/jakirkham Approvers: - Peter Andreas Entschev (https://github.com/pentschev) URL: https://github.com/rapidsai/ucx-py/pull/1086 --- docs/source/ucx-debug.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/ucx-debug.rst b/docs/source/ucx-debug.rst index fcd0fdb1..c2652992 100644 --- a/docs/source/ucx-debug.rst +++ b/docs/source/ucx-debug.rst @@ -33,7 +33,7 @@ For example, we can check if UCX has been built correctly with ``RDMA`` and if i #define HAVE_DECL_RDMA_ESTABLISH 1 #define HAVE_DECL_RDMA_INIT_QP_ATTR 1 #define HAVE_RDMACM_QP_LESS 1 - #define UCX_CONFIGURE_FLAGS "--disable-logging --disable-debug --disable-assertions --disable-params-check --prefix=/gpfs/fs1/user/miniconda3/envs/ucx-dev --with-sysroot --enable-cma --enable-mt --with-gnu-ld --with-rdmacm --with-verbs --with-cuda=/gpfs/fs1/SHARE/Utils/CUDA/10.2.89.0_440.33.01" + #define UCX_CONFIGURE_FLAGS "--disable-logging --disable-debug --disable-assertions --disable-params-check --prefix=/gpfs/fs1/user/miniforge/envs/ucx-dev --with-sysroot --enable-cma --enable-mt --with-gnu-ld --with-rdmacm --with-verbs --with-cuda=/gpfs/fs1/SHARE/Utils/CUDA/10.2.89.0_440.33.01" #define uct_MODULES ":cuda:ib:rdmacm:cma" From a3aedc738bc4459c91f72dbef324cb60f8270454 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Tue, 22 Oct 2024 02:20:31 -0700 Subject: [PATCH 7/7] Use Cython's `array` to back `Py_ssize_t[::1]` (#1087) In `Array`, `Py_ssize_t[::1]` objects are currently backed by [CPython `array`'s]( https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html#cpython-array-module ) with some internal bits expressed in Cython. However these are not compatible with [Python's Limited API and Stable ABI]( https://docs.python.org/3/c-api/stable.html#c-api-stability ). To address that, switch to [Cython's own `array` type]( https://cython.readthedocs.io/en/latest/src/userguide/memoryviews.html#cython-arrays ). As this is baked into Cython and doesn't use anything special, it is compatible with Python's Limited API and Stable ABI. xref: https://github.com/rapidsai/build-planning/issues/42 Authors: - https://github.com/jakirkham Approvers: - Peter Andreas Entschev (https://github.com/pentschev) URL: https://github.com/rapidsai/ucx-py/pull/1087 --- ucp/_libs/arr.pyx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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)