diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2b010694..5cd4e60c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,16 +5,16 @@ cpp/ @rapidsai/ucxx-cpp-codeowners python/ @rapidsai/ucxx-python-codeowners #cmake code owners -cpp/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -cpp/python/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -cpp/examples/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -cpp/benchmarks/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -cpp/tests/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -python/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -python/ucxx/examples/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -python/ucxx/_lib/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners -fetch_rapids.cmake @rapidsai/ucxx-cmake-codeowners -**/cmake/ @rapidsai/ucxx-cmake-codeowners +cpp/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +cpp/python/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +cpp/examples/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +cpp/benchmarks/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +cpp/tests/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +python/ucxx/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +python/ucxx/ucxx/examples/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +python/ucxx/ucxx/_lib/CMakeLists.txt @rapidsai/ucxx-cmake-codeowners +fetch_rapids.cmake @rapidsai/ucxx-cmake-codeowners +**/cmake/ @rapidsai/ucxx-cmake-codeowners #CI code owners /.github/ @rapidsai/ci-codeowners diff --git a/.gitignore b/.gitignore index 3cadf326..c61ca7b1 100644 --- a/.gitignore +++ b/.gitignore @@ -16,11 +16,11 @@ dask-worker-space dist/ python/distributed-ucxx/record.txt python/record.txt -python/ucxx/_lib/*.a -python/ucxx/_lib/*.o -python/ucxx/_lib/*.c -python/ucxx/_lib/*.cpp -python/ucxx/_lib/*.h +python/ucxx/ucxx/_lib/*.a +python/ucxx/ucxx/_lib/*.o +python/ucxx/ucxx/_lib/*.c +python/ucxx/ucxx/_lib/*.cpp +python/ucxx/ucxx/_lib/*.h wheels/ *.egg-info/ _skbuild/ diff --git a/build.sh b/build.sh index b6309877..7fabd868 100755 --- a/build.sh +++ b/build.sh @@ -40,7 +40,7 @@ HELP="$0 [clean] [libucxx] [libucxx_python] [ucxx] [distributed_ucxx] [benchmark default action (no args) is to build and install 'libucxx' and 'libucxx_python', then 'ucxx' targets, and finally 'distributed_ucxx' " LIB_BUILD_DIR=${LIB_BUILD_DIR:=${REPODIR}/cpp/build} -UCXX_BUILD_DIR=${REPODIR}/python/build +UCXX_BUILD_DIR=${REPODIR}/python/ucxx/build BUILD_DIRS="${LIB_BUILD_DIR} ${UCXX_BUILD_DIR}" @@ -224,7 +224,7 @@ if buildAll || hasArg ucxx; then export SKBUILD_INSTALL_STRIP=${SKBUILD_INSTALL_STRIP:-false} fi - cd ${REPODIR}/python/ + cd ${REPODIR}/python/ucxx/ SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_BUILD_TYPE=${BUILD_TYPE};${SKBUILD_EXTRA_CMAKE_ARGS}" \ python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true . fi diff --git a/build_and_run.sh b/build_and_run.sh index 08dd6b65..e321e350 100755 --- a/build_and_run.sh +++ b/build_and_run.sh @@ -134,13 +134,13 @@ run_tests_async() { ENABLE_PYTHON_FUTURE=$3 SKIP=$4 - CMD_LINE="UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} pytest -vs python/ucxx/_lib_async/tests/" + CMD_LINE="UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} pytest -vs python/ucxx/ucxx/_lib_async/tests/" if [ $SKIP -ne 0 ]; then echo -e "\e[31;1mSkipping unstable test: ${CMD_LINE}\e[0m" else echo -e "\e[1mRunning: ${CMD_LINE}\e[0m" - UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} pytest -vs python/ucxx/_lib_async/tests/ + UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} pytest -vs python/ucxx/ucxx/_lib_async/tests/ fi } @@ -190,8 +190,8 @@ if [[ $RUN_CPP_EXAMPLE != 0 ]]; then run_cpp_example wait fi if [[ $RUN_PY_TESTS != 0 ]]; then - echo -e "\e[1mRunning: pytest-vs python/ucxx/_lib/tests/\e[0m" - pytest -vs python/ucxx/_lib/tests/ + echo -e "\e[1mRunning: pytest-vs python/ucxx/ucxx/_lib/tests/\e[0m" + pytest -vs python/ucxx/ucxx/_lib/tests/ fi if [[ $RUN_PY_ASYNC_TESTS != 0 ]]; then # run_tests_async PROGRESS_MODE ENABLE_DELAYED_SUBMISSION ENABLE_PYTHON_FUTURE SKIP diff --git a/ci/build_wheel_ucxx.sh b/ci/build_wheel_ucxx.sh index 12cdcbde..04897ffe 100755 --- a/ci/build_wheel_ucxx.sh +++ b/ci/build_wheel_ucxx.sh @@ -3,6 +3,6 @@ set -euo pipefail -package_dir="python" +package_dir="python/ucxx" ./ci/build_wheel.sh ucxx ${package_dir} diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 076c3bc8..25ae55fd 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -49,7 +49,7 @@ for DEP in "${DEPENDENCIES[@]}"; do for FILE in dependencies.yaml conda/environments/*.yaml; do 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_RAPIDS_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/pyproject.toml + sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_RAPIDS_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/ucxx/pyproject.toml sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_RAPIDS_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/distributed-ucxx/pyproject.toml done @@ -61,7 +61,7 @@ for DEP in "${UCXX_DEPENDENCIES[@]}"; do for FILE in dependencies.yaml; do sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/,>=0.0.0a0/g" "${FILE}" done - sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/pyproject.toml + sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/ucxx/pyproject.toml sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*,>=0.0.0a0\"/g" python/distributed-ucxx/pyproject.toml done diff --git a/ci/test_common.sh b/ci/test_common.sh index 90849e4c..1480e17f 100755 --- a/ci/test_common.sh +++ b/ci/test_common.sh @@ -117,9 +117,9 @@ run_cpp_port_retry() { #################################### Python #################################### run_py_tests() { - CMD_LINE="timeout 2m python -m pytest -vs python/ucxx/_lib/tests/" + CMD_LINE="timeout 2m python -m pytest -vs python/ucxx/ucxx/_lib/tests/" log_command "${CMD_LINE}" - timeout 2m python -m pytest -vs python/ucxx/_lib/tests/ + timeout 2m python -m pytest -vs python/ucxx/ucxx/_lib/tests/ } run_py_tests_async() { @@ -128,13 +128,13 @@ run_py_tests_async() { ENABLE_PYTHON_FUTURE=$3 SKIP=$4 - CMD_LINE="UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} timeout 20m python -m pytest -vs python/ucxx/_lib_async/tests/ --durations=50" + CMD_LINE="UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} timeout 20m python -m pytest -vs python/ucxx/ucxx/_lib_async/tests/ --durations=50" if [ $SKIP -ne 0 ]; then echo -e "\e[1;33mSkipping unstable test: ${CMD_LINE}\e[0m" else log_command "${CMD_LINE}" - UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} timeout 20m python -m pytest -vs python/ucxx/_lib_async/tests/ --durations=50 + UCXPY_PROGRESS_MODE=${PROGRESS_MODE} UCXPY_ENABLE_DELAYED_SUBMISSION=${ENABLE_DELAYED_SUBMISSION} UCXPY_ENABLE_PYTHON_FUTURE=${ENABLE_PYTHON_FUTURE} timeout 20m python -m pytest -vs python/ucxx/ucxx/_lib_async/tests/ --durations=50 fi } diff --git a/dependencies.yaml b/dependencies.yaml index bef25e3f..dea84b1a 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -58,14 +58,14 @@ files: - py_version py_rapids_build_ucxx: output: pyproject - pyproject_dir: python + pyproject_dir: python/ucxx extras: table: build-system includes: - rapids_build_skbuild py_build_ucxx: output: pyproject - pyproject_dir: python + pyproject_dir: python/ucxx extras: table: tool.rapids-build-backend key: requires @@ -75,7 +75,7 @@ files: - depends_on_ucx_build py_run_ucxx: output: pyproject - pyproject_dir: python + pyproject_dir: python/ucxx extras: table: project includes: @@ -84,7 +84,7 @@ files: - depends_on_ucx_run py_test_ucxx: output: pyproject - pyproject_dir: python + pyproject_dir: python/ucxx extras: table: project.optional-dependencies key: test diff --git a/python/LICENSE b/python/LICENSE deleted file mode 120000 index ea5b6064..00000000 --- a/python/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../LICENSE \ No newline at end of file diff --git a/python/README.md b/python/README.md deleted file mode 120000 index 32d46ee8..00000000 --- a/python/README.md +++ /dev/null @@ -1 +0,0 @@ -../README.md \ No newline at end of file diff --git a/python/pyproject.toml b/python/pyproject.toml index 28044194..649fceff 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,56 +1,3 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. -# SPDX-License-Identifier: BSD-3-Clause - -[build-system] -build-backend = "rapids_build_backend.build" -requires = [ - "rapids-build-backend>=0.3.0,<0.4.0.dev0", - "scikit-build-core[pyproject]>=0.7.0", -] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. - -[project] -name = "ucxx" -dynamic = ["version"] -description = "Python Bindings for the Unified Communication X library (UCX)" -readme = { file = "README.md", content-type = "text/markdown" } -authors = [ - { name = "NVIDIA Corporation" }, -] -license = { text = "BSD-3-Clause" } -requires-python = ">=3.9" -dependencies = [ - "libucx>=1.15.0", - "numpy>=1.23,<2.0a0", - "pynvml>=11.4.1", - "rmm==24.10.*,>=0.0.0a0", -] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. -classifiers = [ - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: BSD License", - "Operating System :: POSIX :: Linux", - "Programming Language :: Python", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Hardware", - "Topic :: System :: Systems Administration", - "Programming Language :: Python :: 3", -] - -[project.optional-dependencies] -test = [ - "cloudpickle", - "cudf==24.10.*,>=0.0.0a0", - "cupy-cuda11x>=12.0.0", - "numba>=0.57.1", - "pytest-asyncio", - "pytest-rerunfailures", - "pytest==7.*", - "rapids-dask-dependency==24.10.*,>=0.0.0a0", -] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. - -[project.urls] -Homepage = "https://github.com/rapidsai/ucxx" - [tool.isort] line_length = 79 multi_line_output = 3 @@ -67,7 +14,8 @@ known_rapids = [ "cudf", ] known_first_party = [ - "ucp", + "ucxx", + "distributed_ucxx", ] default_section = "THIRDPARTY" sections = [ @@ -91,32 +39,6 @@ skip = [ "__init__.py", ] -[tool.rapids-build-backend] -build-backend = "scikit_build_core.build" -dependencies-file = "../dependencies.yaml" -matrix-entry = "cuda_suffixed=true" -requires = [ - "cmake>=3.26.4,!=3.30.0", - "cython>=3.0.0", - "libucx==1.15.0", - "ninja", - "rmm==24.10.*,>=0.0.0a0", -] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. - -[tool.scikit-build] -build-dir = "build/{wheel_tag}" -cmake.build-type = "Release" -cmake.minimum-version = "3.26.4" -ninja.make-fallback = true -sdist.exclude = ["*tests*"] -sdist.reproducible = true -wheel.packages = ["ucxx"] - -[tool.scikit-build.metadata.version] -provider = "scikit_build_core.metadata.regex" -input = "ucxx/VERSION" -regex = "(?P.*)" - [tool.ruff] select = ["E", "F", "W"] ignore = [ diff --git a/python/CMakeLists.txt b/python/ucxx/CMakeLists.txt similarity index 91% rename from python/CMakeLists.txt rename to python/ucxx/CMakeLists.txt index 537fd941..02232245 100644 --- a/python/CMakeLists.txt +++ b/python/ucxx/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) -file(READ "${CMAKE_CURRENT_LIST_DIR}/../VERSION" _version_contents) +file(READ "${CMAKE_CURRENT_LIST_DIR}/../../VERSION" _version_contents) if(_version_contents MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*$") set(ucxx_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}") else() @@ -13,7 +13,7 @@ else() message(FATAL_ERROR "Could not determine ucxx version. Contents of VERSION file:\n ${_version_contents_formatted}") endif() -include(../fetch_rapids.cmake) +include(../../fetch_rapids.cmake) project( ucxx-python @@ -42,7 +42,7 @@ if(NOT ucxx_FOUND) set(_exclude_from_all "") - add_subdirectory(../cpp ucxx-cpp ${_exclude_from_all}) + add_subdirectory(../../cpp ucxx-cpp ${_exclude_from_all}) # Since ucxx._lib requires access to libucxx, we place the library in the ucxx directory # and modify the rpaths appropriately. diff --git a/python/ucxx/LICENSE b/python/ucxx/LICENSE new file mode 120000 index 00000000..30cff740 --- /dev/null +++ b/python/ucxx/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/python/ucxx/README.md b/python/ucxx/README.md new file mode 120000 index 00000000..fe840054 --- /dev/null +++ b/python/ucxx/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/python/ucxx/VERSION b/python/ucxx/VERSION deleted file mode 120000 index 558194c5..00000000 --- a/python/ucxx/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../VERSION \ No newline at end of file diff --git a/python/examples/basic.py b/python/ucxx/examples/basic.py similarity index 99% rename from python/examples/basic.py rename to python/ucxx/examples/basic.py index 7138a756..291ccc17 100644 --- a/python/examples/basic.py +++ b/python/ucxx/examples/basic.py @@ -5,6 +5,7 @@ import asyncio import numpy as np + import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx._lib_async.utils import get_event_loop diff --git a/python/ucxx/pyproject.toml b/python/ucxx/pyproject.toml new file mode 100644 index 00000000..e5d263a4 --- /dev/null +++ b/python/ucxx/pyproject.toml @@ -0,0 +1,78 @@ +# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. +# SPDX-License-Identifier: BSD-3-Clause + +[build-system] +build-backend = "rapids_build_backend.build" +requires = [ + "rapids-build-backend>=0.3.0,<0.4.0.dev0", + "scikit-build-core[pyproject]>=0.7.0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[project] +name = "ucxx" +dynamic = ["version"] +description = "Python Bindings for the Unified Communication X library (UCX)" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "BSD-3-Clause" } +requires-python = ">=3.9" +dependencies = [ + "libucx>=1.15.0", + "numpy>=1.23,<2.0a0", + "pynvml>=11.4.1", + "rmm==24.10.*,>=0.0.0a0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: BSD License", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Hardware", + "Topic :: System :: Systems Administration", + "Programming Language :: Python :: 3", +] + +[project.optional-dependencies] +test = [ + "cloudpickle", + "cudf==24.10.*,>=0.0.0a0", + "cupy-cuda11x>=12.0.0", + "numba>=0.57.1", + "pytest-asyncio", + "pytest-rerunfailures", + "pytest==7.*", + "rapids-dask-dependency==24.10.*,>=0.0.0a0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[project.urls] +Homepage = "https://github.com/rapidsai/ucxx" + +[tool.rapids-build-backend] +build-backend = "scikit_build_core.build" +dependencies-file = "../../dependencies.yaml" +matrix-entry = "cuda_suffixed=true" +requires = [ + "cmake>=3.26.4,!=3.30.0", + "cython>=3.0.0", + "libucx==1.15.0", + "ninja", + "rmm==24.10.*,>=0.0.0a0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[tool.scikit-build] +build-dir = "build/{wheel_tag}" +cmake.build-type = "Release" +cmake.minimum-version = "3.26.4" +ninja.make-fallback = true +sdist.exclude = ["*tests*"] +sdist.reproducible = true +wheel.packages = ["ucxx"] + +[tool.scikit-build.metadata.version] +provider = "scikit_build_core.metadata.regex" +input = "ucxx/VERSION" +regex = "(?P.*)" diff --git a/python/ucxx/ucxx/VERSION b/python/ucxx/ucxx/VERSION new file mode 120000 index 00000000..d62dc733 --- /dev/null +++ b/python/ucxx/ucxx/VERSION @@ -0,0 +1 @@ +../../../VERSION \ No newline at end of file diff --git a/python/ucxx/__init__.py b/python/ucxx/ucxx/__init__.py similarity index 100% rename from python/ucxx/__init__.py rename to python/ucxx/ucxx/__init__.py diff --git a/python/ucxx/_lib/CMakeLists.txt b/python/ucxx/ucxx/_lib/CMakeLists.txt similarity index 100% rename from python/ucxx/_lib/CMakeLists.txt rename to python/ucxx/ucxx/_lib/CMakeLists.txt diff --git a/python/ucxx/_lib/__init__.pxd b/python/ucxx/ucxx/_lib/__init__.pxd similarity index 100% rename from python/ucxx/_lib/__init__.pxd rename to python/ucxx/ucxx/_lib/__init__.pxd diff --git a/python/ucxx/_lib/__init__.py b/python/ucxx/ucxx/_lib/__init__.py similarity index 100% rename from python/ucxx/_lib/__init__.py rename to python/ucxx/ucxx/_lib/__init__.py diff --git a/python/ucxx/_lib/arr.pxd b/python/ucxx/ucxx/_lib/arr.pxd similarity index 100% rename from python/ucxx/_lib/arr.pxd rename to python/ucxx/ucxx/_lib/arr.pxd diff --git a/python/ucxx/_lib/arr.pyi b/python/ucxx/ucxx/_lib/arr.pyi similarity index 100% rename from python/ucxx/_lib/arr.pyi rename to python/ucxx/ucxx/_lib/arr.pyi diff --git a/python/ucxx/_lib/arr.pyx b/python/ucxx/ucxx/_lib/arr.pyx similarity index 100% rename from python/ucxx/_lib/arr.pyx rename to python/ucxx/ucxx/_lib/arr.pyx diff --git a/python/ucxx/_lib/libucxx.pyx b/python/ucxx/ucxx/_lib/libucxx.pyx similarity index 100% rename from python/ucxx/_lib/libucxx.pyx rename to python/ucxx/ucxx/_lib/libucxx.pyx diff --git a/python/ucxx/_lib/tag.pyx b/python/ucxx/ucxx/_lib/tag.pyx similarity index 100% rename from python/ucxx/_lib/tag.pyx rename to python/ucxx/ucxx/_lib/tag.pyx diff --git a/python/ucxx/_lib/tests/conftest.py b/python/ucxx/ucxx/_lib/tests/conftest.py similarity index 100% rename from python/ucxx/_lib/tests/conftest.py rename to python/ucxx/ucxx/_lib/tests/conftest.py diff --git a/python/ucxx/_lib/tests/test_address_object.py b/python/ucxx/ucxx/_lib/tests/test_address_object.py similarity index 100% rename from python/ucxx/_lib/tests/test_address_object.py rename to python/ucxx/ucxx/_lib/tests/test_address_object.py diff --git a/python/ucxx/_lib/tests/test_arr.py b/python/ucxx/ucxx/_lib/tests/test_arr.py similarity index 99% rename from python/ucxx/_lib/tests/test_arr.py rename to python/ucxx/ucxx/_lib/tests/test_arr.py index f66544d3..bc4a08bf 100644 --- a/python/ucxx/_lib/tests/test_arr.py +++ b/python/ucxx/ucxx/_lib/tests/test_arr.py @@ -8,6 +8,7 @@ import operator import pytest + from ucxx._lib.arr import Array builtin_buffers = [ diff --git a/python/ucxx/_lib/tests/test_cancel.py b/python/ucxx/ucxx/_lib/tests/test_cancel.py similarity index 99% rename from python/ucxx/_lib/tests/test_cancel.py rename to python/ucxx/ucxx/_lib/tests/test_cancel.py index 1fb6a2f3..db4d3b7b 100644 --- a/python/ucxx/_lib/tests/test_cancel.py +++ b/python/ucxx/ucxx/_lib/tests/test_cancel.py @@ -4,6 +4,7 @@ import multiprocessing as mp import pytest + import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx.testing import terminate_process diff --git a/python/ucxx/_lib/tests/test_config.py b/python/ucxx/ucxx/_lib/tests/test_config.py similarity index 99% rename from python/ucxx/_lib/tests/test_config.py rename to python/ucxx/ucxx/_lib/tests/test_config.py index 8f10eb57..e122f457 100644 --- a/python/ucxx/_lib/tests/test_config.py +++ b/python/ucxx/ucxx/_lib/tests/test_config.py @@ -5,6 +5,7 @@ from unittest.mock import patch import pytest + import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx._lib.libucxx import UCXInvalidParamError diff --git a/python/ucxx/_lib/tests/test_endpoint.py b/python/ucxx/ucxx/_lib/tests/test_endpoint.py similarity index 99% rename from python/ucxx/_lib/tests/test_endpoint.py rename to python/ucxx/ucxx/_lib/tests/test_endpoint.py index beac250b..71a3f926 100644 --- a/python/ucxx/_lib/tests/test_endpoint.py +++ b/python/ucxx/ucxx/_lib/tests/test_endpoint.py @@ -5,6 +5,7 @@ import os import pytest + import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx.testing import terminate_process, wait_requests diff --git a/python/ucxx/_lib/tests/test_listener.py b/python/ucxx/ucxx/_lib/tests/test_listener.py similarity index 100% rename from python/ucxx/_lib/tests/test_listener.py rename to python/ucxx/ucxx/_lib/tests/test_listener.py diff --git a/python/ucxx/_lib/tests/test_probe.py b/python/ucxx/ucxx/_lib/tests/test_probe.py similarity index 99% rename from python/ucxx/_lib/tests/test_probe.py rename to python/ucxx/ucxx/_lib/tests/test_probe.py index e6c2a263..9f9bc40c 100644 --- a/python/ucxx/_lib/tests/test_probe.py +++ b/python/ucxx/ucxx/_lib/tests/test_probe.py @@ -4,6 +4,7 @@ import multiprocessing as mp import pytest + from ucxx._lib import libucxx as ucx_api from ucxx._lib.arr import Array from ucxx.testing import terminate_process, wait_requests diff --git a/python/ucxx/_lib/tests/test_server_client.py b/python/ucxx/ucxx/_lib/tests/test_server_client.py similarity index 99% rename from python/ucxx/_lib/tests/test_server_client.py rename to python/ucxx/ucxx/_lib/tests/test_server_client.py index ca29be08..4970134d 100644 --- a/python/ucxx/_lib/tests/test_server_client.py +++ b/python/ucxx/ucxx/_lib/tests/test_server_client.py @@ -6,6 +6,7 @@ from queue import Empty as QueueIsEmpty import pytest + import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx.testing import terminate_process, wait_requests diff --git a/python/ucxx/_lib/tests/test_ucx_getters.py b/python/ucxx/ucxx/_lib/tests/test_ucx_getters.py similarity index 99% rename from python/ucxx/_lib/tests/test_ucx_getters.py rename to python/ucxx/ucxx/_lib/tests/test_ucx_getters.py index 3f4af035..16c069ca 100644 --- a/python/ucxx/_lib/tests/test_ucx_getters.py +++ b/python/ucxx/ucxx/_lib/tests/test_ucx_getters.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: BSD-3-Clause import pytest + import ucxx._lib.libucxx as ucx_api diff --git a/python/ucxx/_lib/tests/test_utils.py b/python/ucxx/ucxx/_lib/tests/test_utils.py similarity index 99% rename from python/ucxx/_lib/tests/test_utils.py rename to python/ucxx/ucxx/_lib/tests/test_utils.py index 3c653bd6..50f596e2 100644 --- a/python/ucxx/_lib/tests/test_utils.py +++ b/python/ucxx/ucxx/_lib/tests/test_utils.py @@ -6,6 +6,7 @@ from multiprocessing.queues import Empty import pytest + from ucxx.testing import terminate_process diff --git a/python/ucxx/_lib/tests/test_version.py b/python/ucxx/ucxx/_lib/tests/test_version.py similarity index 100% rename from python/ucxx/_lib/tests/test_version.py rename to python/ucxx/ucxx/_lib/tests/test_version.py diff --git a/python/ucxx/_lib/ucxx_api.pxd b/python/ucxx/ucxx/_lib/ucxx_api.pxd similarity index 100% rename from python/ucxx/_lib/ucxx_api.pxd rename to python/ucxx/ucxx/_lib/ucxx_api.pxd diff --git a/python/ucxx/_lib_async/__init__.py b/python/ucxx/ucxx/_lib_async/__init__.py similarity index 100% rename from python/ucxx/_lib_async/__init__.py rename to python/ucxx/ucxx/_lib_async/__init__.py diff --git a/python/ucxx/_lib_async/application_context.py b/python/ucxx/ucxx/_lib_async/application_context.py similarity index 100% rename from python/ucxx/_lib_async/application_context.py rename to python/ucxx/ucxx/_lib_async/application_context.py diff --git a/python/ucxx/_lib_async/continuous_ucx_progress.py b/python/ucxx/ucxx/_lib_async/continuous_ucx_progress.py similarity index 100% rename from python/ucxx/_lib_async/continuous_ucx_progress.py rename to python/ucxx/ucxx/_lib_async/continuous_ucx_progress.py diff --git a/python/ucxx/_lib_async/endpoint.py b/python/ucxx/ucxx/_lib_async/endpoint.py similarity index 100% rename from python/ucxx/_lib_async/endpoint.py rename to python/ucxx/ucxx/_lib_async/endpoint.py diff --git a/python/ucxx/_lib_async/exchange_peer_info.py b/python/ucxx/ucxx/_lib_async/exchange_peer_info.py similarity index 100% rename from python/ucxx/_lib_async/exchange_peer_info.py rename to python/ucxx/ucxx/_lib_async/exchange_peer_info.py diff --git a/python/ucxx/_lib_async/listener.py b/python/ucxx/ucxx/_lib_async/listener.py similarity index 100% rename from python/ucxx/_lib_async/listener.py rename to python/ucxx/ucxx/_lib_async/listener.py diff --git a/python/ucxx/_lib_async/notifier_thread.py b/python/ucxx/ucxx/_lib_async/notifier_thread.py similarity index 100% rename from python/ucxx/_lib_async/notifier_thread.py rename to python/ucxx/ucxx/_lib_async/notifier_thread.py diff --git a/python/ucxx/_lib_async/tests/conftest.py b/python/ucxx/ucxx/_lib_async/tests/conftest.py similarity index 100% rename from python/ucxx/_lib_async/tests/conftest.py rename to python/ucxx/ucxx/_lib_async/tests/conftest.py diff --git a/python/ucxx/_lib_async/tests/test_benchmark_cluster.py b/python/ucxx/ucxx/_lib_async/tests/test_benchmark_cluster.py similarity index 99% rename from python/ucxx/_lib_async/tests/test_benchmark_cluster.py rename to python/ucxx/ucxx/_lib_async/tests/test_benchmark_cluster.py index 59f867ea..7bb57ce8 100644 --- a/python/ucxx/_lib_async/tests/test_benchmark_cluster.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_benchmark_cluster.py @@ -7,6 +7,7 @@ import numpy as np import pytest + from ucxx.benchmarks.utils import _run_cluster_server, _run_cluster_workers diff --git a/python/ucxx/_lib_async/tests/test_config.py b/python/ucxx/ucxx/_lib_async/tests/test_config.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_config.py rename to python/ucxx/ucxx/_lib_async/tests/test_config.py index e5974f87..98375194 100644 --- a/python/ucxx/_lib_async/tests/test_config.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_config.py @@ -5,9 +5,9 @@ from unittest.mock import patch import pytest -from ucxx._lib_async.utils_test import captured_logger import ucxx +from ucxx._lib_async.utils_test import captured_logger def test_get_config(): diff --git a/python/ucxx/_lib_async/tests/test_custom_send_recv.py b/python/ucxx/ucxx/_lib_async/tests/test_custom_send_recv.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_custom_send_recv.py rename to python/ucxx/ucxx/_lib_async/tests/test_custom_send_recv.py index 404939fe..04fd74b1 100644 --- a/python/ucxx/_lib_async/tests/test_custom_send_recv.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_custom_send_recv.py @@ -6,9 +6,9 @@ import numpy as np import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers cudf = pytest.importorskip("cudf") distributed = pytest.importorskip("distributed") diff --git a/python/ucxx/_lib_async/tests/test_disconnect.py b/python/ucxx/ucxx/_lib_async/tests/test_disconnect.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_disconnect.py rename to python/ucxx/ucxx/_lib_async/tests/test_disconnect.py index 779bc502..6c4d15b7 100644 --- a/python/ucxx/_lib_async/tests/test_disconnect.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_disconnect.py @@ -9,10 +9,10 @@ import numpy as np import pytest -from ucxx._lib_async.utils import get_event_loop -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils import get_event_loop +from ucxx._lib_async.utils_test import wait_listener_client_handlers mp = mp.get_context("spawn") diff --git a/python/ucxx/_lib_async/tests/test_endpoint.py b/python/ucxx/ucxx/_lib_async/tests/test_endpoint.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_endpoint.py rename to python/ucxx/ucxx/_lib_async/tests/test_endpoint.py index 01308046..abd82669 100644 --- a/python/ucxx/_lib_async/tests/test_endpoint.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_endpoint.py @@ -5,9 +5,9 @@ from queue import Empty, Queue import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers @pytest.mark.asyncio diff --git a/python/ucxx/_lib_async/tests/test_from_worker_address.py b/python/ucxx/ucxx/_lib_async/tests/test_from_worker_address.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_from_worker_address.py rename to python/ucxx/ucxx/_lib_async/tests/test_from_worker_address.py index d6667335..eb1d3a6a 100644 --- a/python/ucxx/_lib_async/tests/test_from_worker_address.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_from_worker_address.py @@ -8,9 +8,9 @@ import numpy as np import pytest -from ucxx._lib_async.utils import get_event_loop, hash64bits import ucxx +from ucxx._lib_async.utils import get_event_loop, hash64bits mp = mp.get_context("spawn") diff --git a/python/ucxx/_lib_async/tests/test_from_worker_address_error.py b/python/ucxx/ucxx/_lib_async/tests/test_from_worker_address_error.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_from_worker_address_error.py rename to python/ucxx/ucxx/_lib_async/tests/test_from_worker_address_error.py index 6564a5db..35d580f8 100644 --- a/python/ucxx/_lib_async/tests/test_from_worker_address_error.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_from_worker_address_error.py @@ -9,9 +9,9 @@ import numpy as np import pytest -from ucxx._lib_async.utils import get_event_loop import ucxx +from ucxx._lib_async.utils import get_event_loop mp = mp.get_context("spawn") diff --git a/python/ucxx/_lib_async/tests/test_info.py b/python/ucxx/ucxx/_lib_async/tests/test_info.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_info.py rename to python/ucxx/ucxx/_lib_async/tests/test_info.py diff --git a/python/ucxx/_lib_async/tests/test_multiple_nodes.py b/python/ucxx/ucxx/_lib_async/tests/test_multiple_nodes.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_multiple_nodes.py rename to python/ucxx/ucxx/_lib_async/tests/test_multiple_nodes.py index b37517cd..02d377ff 100644 --- a/python/ucxx/_lib_async/tests/test_multiple_nodes.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_multiple_nodes.py @@ -5,9 +5,9 @@ import numpy as np import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers def get_somaxconn(): diff --git a/python/ucxx/_lib_async/tests/test_probe.py b/python/ucxx/ucxx/_lib_async/tests/test_probe.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_probe.py rename to python/ucxx/ucxx/_lib_async/tests/test_probe.py index e1401e78..40ecc820 100644 --- a/python/ucxx/_lib_async/tests/test_probe.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_probe.py @@ -4,10 +4,10 @@ import asyncio import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers -from ucxx.types import Tag import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers +from ucxx.types import Tag @pytest.mark.asyncio diff --git a/python/ucxx/_lib_async/tests/test_reset.py b/python/ucxx/ucxx/_lib_async/tests/test_reset.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_reset.py rename to python/ucxx/ucxx/_lib_async/tests/test_reset.py index 7a39d956..2c43c849 100644 --- a/python/ucxx/_lib_async/tests/test_reset.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_reset.py @@ -2,9 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers class ResetAfterN: diff --git a/python/ucxx/_lib_async/tests/test_send_recv.py b/python/ucxx/ucxx/_lib_async/tests/test_send_recv.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_send_recv.py rename to python/ucxx/ucxx/_lib_async/tests/test_send_recv.py index 49c34858..0fc9a776 100644 --- a/python/ucxx/_lib_async/tests/test_send_recv.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_send_recv.py @@ -4,9 +4,9 @@ import functools import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers np = pytest.importorskip("numpy") diff --git a/python/ucxx/_lib_async/tests/test_send_recv_am.py b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_am.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_send_recv_am.py rename to python/ucxx/ucxx/_lib_async/tests/test_send_recv_am.py index 31118687..f9904f11 100644 --- a/python/ucxx/_lib_async/tests/test_send_recv_am.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_am.py @@ -3,9 +3,9 @@ import numpy as np import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers msg_sizes = [0] + [2**i for i in range(0, 25, 4)] diff --git a/python/ucxx/_lib_async/tests/test_send_recv_multi.py b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_multi.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_send_recv_multi.py rename to python/ucxx/ucxx/_lib_async/tests/test_send_recv_multi.py index b5712f41..7a33664d 100644 --- a/python/ucxx/_lib_async/tests/test_send_recv_multi.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_multi.py @@ -2,9 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers np = pytest.importorskip("numpy") diff --git a/python/ucxx/_lib_async/tests/test_send_recv_two_workers.py b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_two_workers.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_send_recv_two_workers.py rename to python/ucxx/ucxx/_lib_async/tests/test_send_recv_two_workers.py index b8f44e30..ab67290c 100644 --- a/python/ucxx/_lib_async/tests/test_send_recv_two_workers.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_send_recv_two_workers.py @@ -8,6 +8,8 @@ import numpy as np import pytest + +import ucxx as ucxx from ucxx._lib_async.utils import get_event_loop from ucxx._lib_async.utils_test import ( am_recv, @@ -19,8 +21,6 @@ wait_listener_client_handlers, ) -import ucxx as ucxx - cupy = pytest.importorskip("cupy") rmm = pytest.importorskip("rmm") distributed = pytest.importorskip("distributed") diff --git a/python/ucxx/_lib_async/tests/test_shutdown.py b/python/ucxx/ucxx/_lib_async/tests/test_shutdown.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_shutdown.py rename to python/ucxx/ucxx/_lib_async/tests/test_shutdown.py index d7debcb7..163c4fc3 100644 --- a/python/ucxx/_lib_async/tests/test_shutdown.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_shutdown.py @@ -7,13 +7,13 @@ import numpy as np import pytest + +import ucxx as ucxx from ucxx._lib_async.utils_test import ( captured_logger, wait_listener_client_handlers, ) -import ucxx as ucxx - async def _shutdown_send(ep, message_type): msg = np.arange(10**6) diff --git a/python/ucxx/_lib_async/tests/test_tags.py b/python/ucxx/ucxx/_lib_async/tests/test_tags.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_tags.py rename to python/ucxx/ucxx/_lib_async/tests/test_tags.py index 2eee106c..3a3a507e 100644 --- a/python/ucxx/_lib_async/tests/test_tags.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_tags.py @@ -4,9 +4,9 @@ import asyncio import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx as ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers @pytest.mark.asyncio diff --git a/python/ucxx/_lib_async/tests/test_ucx_getters.py b/python/ucxx/ucxx/_lib_async/tests/test_ucx_getters.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_ucx_getters.py rename to python/ucxx/ucxx/_lib_async/tests/test_ucx_getters.py index 9d2675be..6bf92aae 100644 --- a/python/ucxx/_lib_async/tests/test_ucx_getters.py +++ b/python/ucxx/ucxx/_lib_async/tests/test_ucx_getters.py @@ -2,9 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause import pytest -from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx +from ucxx._lib_async.utils_test import wait_listener_client_handlers @pytest.mark.asyncio diff --git a/python/ucxx/_lib_async/tests/test_version.py b/python/ucxx/ucxx/_lib_async/tests/test_version.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_version.py rename to python/ucxx/ucxx/_lib_async/tests/test_version.py diff --git a/python/ucxx/_lib_async/tests/test_worker.py b/python/ucxx/ucxx/_lib_async/tests/test_worker.py similarity index 100% rename from python/ucxx/_lib_async/tests/test_worker.py rename to python/ucxx/ucxx/_lib_async/tests/test_worker.py diff --git a/python/ucxx/_lib_async/utils.py b/python/ucxx/ucxx/_lib_async/utils.py similarity index 100% rename from python/ucxx/_lib_async/utils.py rename to python/ucxx/ucxx/_lib_async/utils.py diff --git a/python/ucxx/_lib_async/utils_test.py b/python/ucxx/ucxx/_lib_async/utils_test.py similarity index 100% rename from python/ucxx/_lib_async/utils_test.py rename to python/ucxx/ucxx/_lib_async/utils_test.py diff --git a/python/ucxx/_version.py b/python/ucxx/ucxx/_version.py similarity index 100% rename from python/ucxx/_version.py rename to python/ucxx/ucxx/_version.py diff --git a/python/ucxx/benchmarks/__init__.py b/python/ucxx/ucxx/benchmarks/__init__.py similarity index 100% rename from python/ucxx/benchmarks/__init__.py rename to python/ucxx/ucxx/benchmarks/__init__.py diff --git a/python/ucxx/benchmarks/asyncssh.py b/python/ucxx/ucxx/benchmarks/asyncssh.py similarity index 100% rename from python/ucxx/benchmarks/asyncssh.py rename to python/ucxx/ucxx/benchmarks/asyncssh.py diff --git a/python/ucxx/benchmarks/backends/__init__.py b/python/ucxx/ucxx/benchmarks/backends/__init__.py similarity index 100% rename from python/ucxx/benchmarks/backends/__init__.py rename to python/ucxx/ucxx/benchmarks/backends/__init__.py diff --git a/python/ucxx/benchmarks/backends/base.py b/python/ucxx/ucxx/benchmarks/backends/base.py similarity index 100% rename from python/ucxx/benchmarks/backends/base.py rename to python/ucxx/ucxx/benchmarks/backends/base.py diff --git a/python/ucxx/benchmarks/backends/tornado.py b/python/ucxx/ucxx/benchmarks/backends/tornado.py similarity index 99% rename from python/ucxx/benchmarks/backends/tornado.py rename to python/ucxx/ucxx/benchmarks/backends/tornado.py index f7ea1e12..eb08a116 100644 --- a/python/ucxx/benchmarks/backends/tornado.py +++ b/python/ucxx/ucxx/benchmarks/backends/tornado.py @@ -8,6 +8,7 @@ from tornado.iostream import StreamClosedError from tornado.tcpclient import TCPClient from tornado.tcpserver import TCPServer + from ucxx.benchmarks.backends.base import BaseClient, BaseServer diff --git a/python/ucxx/benchmarks/backends/ucxx_async.py b/python/ucxx/ucxx/benchmarks/backends/ucxx_async.py similarity index 99% rename from python/ucxx/benchmarks/backends/ucxx_async.py rename to python/ucxx/ucxx/benchmarks/backends/ucxx_async.py index 4cdbba93..d8cf4487 100644 --- a/python/ucxx/benchmarks/backends/ucxx_async.py +++ b/python/ucxx/ucxx/benchmarks/backends/ucxx_async.py @@ -6,13 +6,12 @@ from queue import Queue from time import monotonic +import ucxx from ucxx._lib.arr import Array from ucxx.benchmarks.backends.base import BaseClient, BaseServer from ucxx.benchmarks.utils import get_allocator from ucxx.utils import print_key_value -import ucxx - def register_am_allocators(args: Namespace): """ diff --git a/python/ucxx/benchmarks/backends/ucxx_core.py b/python/ucxx/ucxx/benchmarks/backends/ucxx_core.py similarity index 99% rename from python/ucxx/benchmarks/backends/ucxx_core.py rename to python/ucxx/ucxx/benchmarks/backends/ucxx_core.py index 760075ff..9360e4bc 100644 --- a/python/ucxx/benchmarks/backends/ucxx_core.py +++ b/python/ucxx/ucxx/benchmarks/backends/ucxx_core.py @@ -5,6 +5,7 @@ from queue import Queue from time import monotonic, sleep +import ucxx import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx._lib_async.utils import get_event_loop @@ -12,8 +13,6 @@ from ucxx.benchmarks.utils import get_allocator from ucxx.utils import print_key_value -import ucxx - WireupMessage = bytearray(b"wireup") diff --git a/python/ucxx/benchmarks/cudf_merge.py b/python/ucxx/ucxx/benchmarks/cudf_merge.py similarity index 100% rename from python/ucxx/benchmarks/cudf_merge.py rename to python/ucxx/ucxx/benchmarks/cudf_merge.py index e3502dfa..ed3e2645 100644 --- a/python/ucxx/benchmarks/cudf_merge.py +++ b/python/ucxx/ucxx/benchmarks/cudf_merge.py @@ -18,6 +18,8 @@ import cupy import numpy as np + +import ucxx from ucxx.benchmarks.asyncssh import run_ssh_cluster from ucxx.benchmarks.utils import ( _run_cluster_server, @@ -33,8 +35,6 @@ print_separator, ) -import ucxx - # Must be set _before_ importing RAPIDS libraries (cuDF, RMM) os.environ["RAPIDS_NO_INITIALIZE"] = "True" diff --git a/python/ucxx/benchmarks/send_recv.py b/python/ucxx/ucxx/benchmarks/send_recv.py similarity index 100% rename from python/ucxx/benchmarks/send_recv.py rename to python/ucxx/ucxx/benchmarks/send_recv.py index bfe7ae4a..cd06abe7 100644 --- a/python/ucxx/benchmarks/send_recv.py +++ b/python/ucxx/ucxx/benchmarks/send_recv.py @@ -7,6 +7,8 @@ import os import numpy as np + +import ucxx from ucxx._lib_async.utils import get_event_loop from ucxx.benchmarks.backends.ucxx_async import ( UCXPyAsyncClient, @@ -20,8 +22,6 @@ print_separator, ) -import ucxx - mp = mp.get_context("spawn") diff --git a/python/ucxx/benchmarks/utils.py b/python/ucxx/ucxx/benchmarks/utils.py similarity index 100% rename from python/ucxx/benchmarks/utils.py rename to python/ucxx/ucxx/benchmarks/utils.py index c0f13a73..bfc7b024 100644 --- a/python/ucxx/benchmarks/utils.py +++ b/python/ucxx/ucxx/benchmarks/utils.py @@ -11,9 +11,9 @@ from types import ModuleType import numpy as np -from ucxx.utils import get_address import ucxx +from ucxx.utils import get_address logger = logging.getLogger("ucx") diff --git a/python/ucxx/core.py b/python/ucxx/ucxx/core.py similarity index 100% rename from python/ucxx/core.py rename to python/ucxx/ucxx/core.py diff --git a/python/ucxx/examples/.clang-format b/python/ucxx/ucxx/examples/.clang-format similarity index 100% rename from python/ucxx/examples/.clang-format rename to python/ucxx/ucxx/examples/.clang-format diff --git a/python/ucxx/examples/CMakeLists.txt b/python/ucxx/ucxx/examples/CMakeLists.txt similarity index 100% rename from python/ucxx/examples/CMakeLists.txt rename to python/ucxx/ucxx/examples/CMakeLists.txt diff --git a/python/ucxx/examples/CPPLINT.cfg b/python/ucxx/ucxx/examples/CPPLINT.cfg similarity index 100% rename from python/ucxx/examples/CPPLINT.cfg rename to python/ucxx/ucxx/examples/CPPLINT.cfg diff --git a/python/ucxx/examples/__init__.pxd b/python/ucxx/ucxx/examples/__init__.pxd similarity index 100% rename from python/ucxx/examples/__init__.pxd rename to python/ucxx/ucxx/examples/__init__.pxd diff --git a/python/ucxx/examples/__init__.py b/python/ucxx/ucxx/examples/__init__.py similarity index 100% rename from python/ucxx/examples/__init__.py rename to python/ucxx/ucxx/examples/__init__.py diff --git a/python/ucxx/examples/python_future_task.h b/python/ucxx/ucxx/examples/python_future_task.h similarity index 100% rename from python/ucxx/examples/python_future_task.h rename to python/ucxx/ucxx/examples/python_future_task.h diff --git a/python/ucxx/examples/python_future_task_api.pxd b/python/ucxx/ucxx/examples/python_future_task_api.pxd similarity index 100% rename from python/ucxx/examples/python_future_task_api.pxd rename to python/ucxx/ucxx/examples/python_future_task_api.pxd diff --git a/python/ucxx/examples/python_future_task_app.pyx b/python/ucxx/ucxx/examples/python_future_task_app.pyx similarity index 100% rename from python/ucxx/examples/python_future_task_app.pyx rename to python/ucxx/ucxx/examples/python_future_task_app.pyx diff --git a/python/ucxx/examples/python_future_task_example.py b/python/ucxx/ucxx/examples/python_future_task_example.py similarity index 100% rename from python/ucxx/examples/python_future_task_example.py rename to python/ucxx/ucxx/examples/python_future_task_example.py diff --git a/python/ucxx/exceptions.py b/python/ucxx/ucxx/exceptions.py similarity index 100% rename from python/ucxx/exceptions.py rename to python/ucxx/ucxx/exceptions.py diff --git a/python/ucxx/testing.py b/python/ucxx/ucxx/testing.py similarity index 100% rename from python/ucxx/testing.py rename to python/ucxx/ucxx/testing.py diff --git a/python/ucxx/types.py b/python/ucxx/ucxx/types.py similarity index 100% rename from python/ucxx/types.py rename to python/ucxx/ucxx/types.py diff --git a/python/ucxx/utils.py b/python/ucxx/ucxx/utils.py similarity index 100% rename from python/ucxx/utils.py rename to python/ucxx/ucxx/utils.py