repo_id
stringlengths
21
96
file_path
stringlengths
31
155
content
stringlengths
1
92.9M
__index_level_0__
int64
0
0
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx/tests/test_ucxx_config.py
from __future__ import annotations import os from time import sleep import pytest import dask from distributed import Client from distributed.utils import get_ip, open_port from distributed.utils_test import popen from distributed_ucxx.ucxx import _prepare_ucx_config from distributed_ucxx.utils_test import gen_test...
0
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx/tests/conftest.py
# We try to be as close as possible to Distributed's testing, thus this file # was taken from https://github.com/dask/distributed/blob/main/conftest.py, # and minimal changes were applied. # https://pytest.org/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option from __future__ import ...
0
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx/tests/test_nanny.py
from distributed import Nanny, Scheduler from distributed.utils_test import gen_test from distributed.worker import Worker class KeyboardInterruptWorker(Worker): """A Worker that raises KeyboardInterrupt almost immediately""" async def heartbeat(self): def raise_err(): raise KeyboardInter...
0
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx/tests/test_deserialize.py
from __future__ import annotations import asyncio import os from functools import partial from distributed.comm import connect, listen from distributed.protocol import Serialized, deserialize, serialize, to_serialize from distributed.utils_test import gen_test # Test deserialization # # `check_*deserialize` are verb...
0
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx
rapidsai_public_repos/ucxx/python/distributed-ucxx/distributed_ucxx/tests/test_worker.py
import pytest from distributed import Client, Nanny from distributed.scheduler import Scheduler from distributed.worker import Worker from distributed_ucxx.utils_test import gen_test @pytest.mark.parametrize("Worker", [Worker, Nanny]) @gen_test() async def test_protocol_from_scheduler_address(ucxx_loop, Worker): ...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/ucxx/core.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import gc import logging import os import re import weakref from ._lib import libucxx as ucx_api from ._lib.libucxx import UCXError from ._lib_async import ApplicationContext logger = logging.g...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/ucxx/testing.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import time from multiprocessing.process import BaseProcess from typing import Type, Union def terminate_process( process: Type[BaseProcess], kill_wait: Union[float, int] = 3.0 ) -> None: ...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/ucxx/exceptions.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from ._lib.libucxx import ( # noqa UCXAlreadyExistsError, UCXBufferTooSmallError, UCXBusyError, UCXCanceled, UCXCanceledError, UCXCloseError, UCXConfigError, UCXC...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/ucxx/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause """UCXX: Python bindings for the Unified Communication X library (UCX <www.openucx.org>)""" import logging import os logger = logging.getLogger("ucx") # Notice, if we have to update environmen...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/ucxx/utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import fcntl import glob import logging import multiprocessing as mp import os import socket import struct import time import numpy as np mp = mp.get_context("spawn") try: from nvtx impor...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/application_context.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import logging import os import threading import weakref from queue import Queue import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx.exceptions import UCXMessageTruncat...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/utils_test.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import io import logging import os from contextlib import contextmanager import numpy as np import pytest import ucxx normal_env = { "UCX_RNDV_SCHEME": "put_zcopy", "UCX...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/exchange_peer_info.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import logging import struct from ucxx._lib.arr import Array from .utils import hash64bits logger = logging.getLogger("ucx") async def exchange_peer_info(endpoint, msg_tag, c...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/endpoint.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import array import asyncio import logging import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx._lib.libucxx import UCXCanceled, UCXCloseError, UCXError from .utils im...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/notifier_thread.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import logging from concurrent.futures import TimeoutError import ucxx._lib.libucxx as ucx_api logger = logging.getLogger("ucx") async def _run_request_notifier(worker): r...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from .application_context import ApplicationContext # noqa from .endpoint import Endpoint # noqa from .listener import Listener # noqa
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/continuous_ucx_progress.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio class ProgressTask(object): def __init__(self, worker, event_loop): """Creates a task that keeps calling worker.progress() Notice, class and created task is...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/listener.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import logging import os import threading import ucxx._lib.libucxx as ucx_api from ucxx.exceptions import UCXMessageTruncatedError from .endpoint import Endpoint from .exchange_p...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import hashlib import multiprocessing as mp mp = mp.get_context("spawn") def get_event_loop(): """ Get running or create new event loop In Python 3.10, the behavio...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_benchmark_cluster.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import tempfile from itertools import chain import numpy as np import pytest from ucxx.benchmarks.utils import _run_cluster_server, _run_cluster_workers async def _worker(rank, ...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_send_recv_multi.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx np = pytest.importorskip("numpy") msg_sizes = [2**i for i in range(0, 25, 4)] # multi_sizes = [0,...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_custom_send_recv.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import pickle import numpy as np import pytest import ucxx cudf = pytest.importorskip("cudf") distributed = pytest.importorskip("distributed") cuda = pytest.importorskip("numba....
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_send_recv_two_workers.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import multiprocessing import os import random import numpy as np import pytest from ucxx._lib_async.utils import get_event_loop from ucxx._lib_async.utils_test import ( am_re...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_probe.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import pytest import ucxx as ucxx @pytest.mark.asyncio @pytest.mark.parametrize("transfer_api", ["am", "tag"]) async def test_message_probe(transfer_api): msg = bytearray(b...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_config.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import os from unittest.mock import patch import pytest from ucxx._lib_async.utils_test import captured_logger import ucxx def test_get_config(): with patch.dict(os.environ): # Un...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_multiple_nodes.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import numpy as np import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx def get_somaxconn(): with open("/proc/sys/net/core/somaxco...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_from_worker_address.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import multiprocessing as mp import os import struct import numpy as np import pytest from ucxx._lib_async.utils import get_event_loop, hash64bits import ucxx mp = mp.get_contex...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_ucx_getters.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx @pytest.mark.asyncio async def test_get_ucp_worker(): worker = ucxx.get_ucp_worker() asse...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_info.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import pytest import ucxx as ucxx @pytest.fixture(autouse=True) def reset(): ucxx.reset() yield ucxx.reset() def test_context_info(): info = ucxx.get_ucp_context_info() a...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_disconnect.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import logging import multiprocessing as mp from io import StringIO from queue import Empty import numpy as np import pytest from ucxx._lib_async.utils import get_event_loop impo...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_endpoint.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio from queue import Empty, Queue import pytest import ucxx @pytest.mark.asyncio @pytest.mark.parametrize("server_close_callback", [True, False]) async def test_close_callback(ser...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_from_worker_address_error.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import multiprocessing as mp import os import re from unittest.mock import patch import numpy as np import pytest from ucxx._lib_async.utils import get_event_loop import ucxx mp...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/conftest.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import os import pytest import ucxx # Prevent calls such as `cudf = pytest.importorskip("cudf")` from initializing # a CUDA context. Such calls may cause tests that must initial...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_tags.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import pytest import ucxx as ucxx @pytest.mark.asyncio async def test_tag_match(): msg1 = bytes("msg1", "utf-8") msg2 = bytes("msg2", "utf-8") async def server_nod...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_send_recv.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import functools import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx np = pytest.importorskip("numpy") msg_sizes = [2**i for i in range(0, 25, 4)] d...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_shutdown.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import logging import sys import numpy as np import pytest from ucxx._lib_async.utils_test import ( captured_logger, wait_listener_client_handlers, ) import ucxx as ucxx ...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_reset.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx class ResetAfterN: """Calls ucxx.reset() after n calls""" def __init__(self, n): ...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_version.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import ucxx def test_get_ucx_version(): version = ucxx.get_ucx_version() assert isinstance(version, tuple) assert len(version) == 3 # Check UCX isn't initialized assert ucxx...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_send_recv_am.py
import asyncio from functools import partial import numpy as np import pytest from ucxx._lib_async.utils_test import wait_listener_client_handlers import ucxx msg_sizes = [0] + [2**i for i in range(0, 25, 4)] def _bytearray_assert_equal(a, b): assert a == b def get_data(): ret = [ { "...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib_async
rapidsai_public_repos/ucxx/python/ucxx/_lib_async/tests/test_worker.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import os from unittest.mock import patch import pytest import ucxx @pytest.mark.asyncio @pytest.mark.parametrize("enable_delayed_submission", [True, False]) @pytest.mark.parametrize("enable_...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/cudf_merge.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause """ Benchmark send receive on one machine """ import argparse import asyncio import cProfile import gc import io import os import pickle import pstats import sys import tempfile from time import ...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/asyncssh.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import json import logging import os import queue import sys from functools import partial logger = logging.getLogger("ucx.asyncssh") logger.setLevel(logging.getLevelName(os.geten...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import json import logging import multiprocessing as mp import os import pickle import threading from types import ModuleType import numpy as np from ucxx.utils import get_address...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/send_recv.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import argparse import asyncio import multiprocessing as mp import os import numpy as np from ucxx._lib_async.utils import get_event_loop from ucxx.benchmarks.backends.ucxx_async import ( UC...
0
rapidsai_public_repos/ucxx/python/ucxx/benchmarks
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/backends/ucxx_core.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from argparse import Namespace from queue import Queue from time import monotonic, sleep import ucxx._lib.libucxx as ucx_api from ucxx._lib.arr import Array from ucxx._lib_async.utils import get...
0
rapidsai_public_repos/ucxx/python/ucxx/benchmarks
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/backends/tornado.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio from time import monotonic import numpy as np from tornado.iostream import StreamClosedError from tornado.tcpclient import TCPClient from tornado.tcpserver import TCPServer from u...
0
rapidsai_public_repos/ucxx/python/ucxx/benchmarks
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/backends/ucxx_async.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio from argparse import Namespace from queue import Queue from time import monotonic from ucxx._lib.arr import Array from ucxx.benchmarks.backends.base import BaseClient, BaseServer ...
0
rapidsai_public_repos/ucxx/python/ucxx/benchmarks
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/backends/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause
0
rapidsai_public_repos/ucxx/python/ucxx/benchmarks
rapidsai_public_repos/ucxx/python/ucxx/benchmarks/backends/base.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from abc import ABC, abstractmethod from argparse import Namespace from queue import Queue class BaseServer(ABC): @abstractmethod def __init__(self, args: Namespace, queue: Queue): ...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/CMakeLists.txt
# ================================================================================= # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD 3-Clause License # ================================================================================= set(cython_sources arr.p...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/libucxx.pyx
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import asyncio import enum import functools import logging from cpython.buffer cimport PyBUF_FORMAT, PyBUF_ND, PyBUF_WRITABLE from cpython.ref cimport PyObject from cython.operator cimport dere...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/arr.pxd
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from libc.stdint cimport uintptr_t cdef class Array: cdef readonly uintptr_t ptr cdef readonly bint readonly cdef readonly object obj cdef readonly Py_ssize_t itemsize cd...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/arr.pyi
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from typing import Tuple class Array: def __init__(self, obj: object): ... @property def c_contiguous(self) -> bool: ... @property def f_contiguous(self) -> bool: ... @pr...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/ucxx_api.pxd
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from posix cimport fcntl cimport numpy as np from libc.stdint cimport int64_t, uint16_t, uint64_t # noqa: E402 from libcpp cimport bool as cpp_bool # noqa: E402 from libcpp.functional cimport...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/__init__.pxd
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/arr.pyx
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from cpython.array cimport array, newarrayobject from cpython.buffer cimport PyBuffer_IsContiguous from cpython.memoryview cimport ( PyMemoryView_FromObject, PyMemoryView_GET_BUFFER, ) f...
0
rapidsai_public_repos/ucxx/python/ucxx
rapidsai_public_repos/ucxx/python/ucxx/_lib/__init__.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause from .libucxx import _create_exceptions # Ensure Python exceptions are created before use _create_exceptions()
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_cancel.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause 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 mp = mp.get_context("spawn") def _ser...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_arr.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import array import functools import io import mmap import operator import pytest from ucxx._lib.arr import Array builtin_buffers = [ b"", b"abcd", array.array("i", []), array.a...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_probe.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause 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 mp = mp.get_context...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_address_object.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import multiprocessing as mp import pickle import ucxx._lib.libucxx as ucx_api mp = mp.get_context("spawn") def test_ucx_address_string(): ctx = ucx_api.UCXContext() worker = ucx_api....
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_config.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import os 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 def test_get_conf...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_endpoint.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import multiprocessing as mp 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 mp = mp.get_co...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_listener.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import ucxx._lib.libucxx as ucx_api def test_listener_ip_port(): ctx = ucx_api.UCXContext() worker = ucx_api.UCXWorker(ctx) def _listener_handler(conn_request): pass l...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_server_client.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import multiprocessing as mp import os 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 terminat...
0
rapidsai_public_repos/ucxx/python/ucxx/_lib
rapidsai_public_repos/ucxx/python/ucxx/_lib/tests/test_utils.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import multiprocessing import re from multiprocessing.queues import Empty import pytest from ucxx.testing import terminate_process def _test_process(queue): while True: try: ...
0
rapidsai_public_repos/ucxx/python
rapidsai_public_repos/ucxx/python/examples/basic.py
# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause import argparse 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 def _create_cuda_context(...
0
rapidsai_public_repos/ucxx/conda
rapidsai_public_repos/ucxx/conda/environments/all_cuda-120_arch-x86_64.yaml
# This file is generated by `rapids-dependency-file-generator`. # To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. channels: - rapidsai - rapidsai-nightly - dask/label/dev - conda-forge - nvidia dependencies: - autoconf - automake - c-compiler - cloudpickle - cmake>=3.26.4 - cud...
0
rapidsai_public_repos/ucxx/conda
rapidsai_public_repos/ucxx/conda/environments/all_cuda-118_arch-x86_64.yaml
# This file is generated by `rapids-dependency-file-generator`. # To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. channels: - rapidsai - rapidsai-nightly - dask/label/dev - conda-forge - nvidia dependencies: - autoconf - automake - c-compiler - cloudpickle - cmake>=3.26.4 - cud...
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/install_libucxx_examples.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause cmake --install cpp/build --component examples
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/install_libucxx_tests.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause cmake --install cpp/build --component testing
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/install_libucxx.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause cmake --install cpp/build cmake --install cpp/build --component benchmarks # For some reason RAPIDS headers are getting installed causing clobbering, which shouldn't happen. # To workaro...
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/conda_build_config.yaml
c_compiler_version: - 11 cxx_compiler_version: - 11 cuda_compiler: - cuda-nvcc cuda11_compiler: - nvcc sysroot_linux_64: - "2.17" cmake: - ">=3.26.4" python: - 3.9 - 3.10 ucx: - "==1.14.*" gmock: - ">=1.13.0" gtest: - ">=1.13.0"
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/build.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause export ucxx_ROOT="$(realpath ./cpp/build)" ./build.sh -n -v libucxx libucxx_python benchmarks examples tests --cmake-args=\"-DCMAKE_INSTALL_LIBDIR=lib\"
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/meta.yaml
# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause {% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} {% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} {% set cuda_version = '.'.join(environ['RAPID...
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/build_and_install_ucxx.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause cmake --install cpp/build --component python ./build.sh ucxx
0
rapidsai_public_repos/ucxx/conda/recipes
rapidsai_public_repos/ucxx/conda/recipes/ucxx/build_and_install_distributed_ucxx.sh
#!/bin/bash # SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD-3-Clause ./build.sh distributed_ucxx
0
rapidsai_public_repos/ucxx
rapidsai_public_repos/ucxx/cpp/CPPLINT.cfg
filter=+build/include_what_you_use,-build/c++11,-build/header_guard,-build/include_order,-readability/todo,-whitespace linelength=100
0
rapidsai_public_repos/ucxx
rapidsai_public_repos/ucxx/cpp/CMakeLists.txt
# ================================================================================= # SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. # SPDX-License-Identifier: BSD 3-Clause License # ================================================================================= cmake_minimum_requi...
0
rapidsai_public_repos/ucxx
rapidsai_public_repos/ucxx/cpp/.clang-format
--- # Refer to the following link for the explanation of each params: # http://releases.llvm.org/8.0.0/tools/clang/docs/ClangFormatStyleOptions.html Language: Cpp # BasedOnStyle: Google AccessModifierOffset: -1 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: true AlignConsecutiveBitFields: true AlignConsecu...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/request_tag_multi.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <mutex> #include <string> #include <vector> #include <ucp/api/ucp.h> #include <ucxx/buffer.h> #include <ucxx/endpoint.h> #include <ucxx/future....
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/config.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <ucp/api/ucp.h> #include <ucxx/typedefs.h> namespace ucxx { class Config { private: ucp_config_t* _handle{nullptr}; ///< Handle to the UCP config ConfigMa...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/inflight_requests.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <map> #include <memory> #include <mutex> namespace ucxx { class Request; typedef std::map<const Request* const, std::shared_ptr<Request>> InflightRequestsMap; t...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/notifier.h
/** * SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <chrono> #include <memory> #include <ucp/api/ucp.h> namespace ucxx { enum class RequestNotifierThreadState { NotRunning = 0, Running, Stopping }; enum class Request...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/api.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #ifndef UCXX_ENABLE_RMM #define UCXX_ENABLE_RMM 0 #endif #include <ucxx/address.h> #include <ucxx/buffer.h> #include <ucxx/constructors.h> #include <ucxx/context.h> #inclu...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/worker_progress_thread.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <functional> #include <memory> #include <mutex> #include <thread> #include <ucxx/delayed_submission.h> namespace ucxx { typedef std::function<void(void)> Signal...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/future.h
/** * SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <ucp/api/ucp.h> #include <ucxx/notifier.h> namespace ucxx { class Future : public std::enable_shared_from_this<Future> { protected: std::shared...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/request.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <atomic> #include <chrono> #include <memory> #include <string> #include <ucp/api/ucp.h> #include <ucxx/component.h> #include <ucxx/endpoint.h> #include <ucxx/fut...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/request_am.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <utility> #include <ucp/api/ucp.h> #include <ucxx/delayed_submission.h> #include <ucxx/request.h> #include <ucxx/typedefs.h> namespace ucxx { ...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/listener.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <string> #include <ucp/api/ucp.h> #include <ucxx/component.h> #include <ucxx/worker.h> namespace ucxx { class Listener : public Component { ...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/request_stream.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <ucp/api/ucp.h> #include <ucxx/delayed_submission.h> #include <ucxx/request.h> #include <ucxx/typedefs.h> namespace ucxx { class RequestStream...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/address.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <string> #include <ucp/api/ucp.h> #include <ucxx/component.h> #include <ucxx/worker.h> namespace ucxx { class Address : public Component { p...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/worker.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <functional> #include <memory> #include <mutex> #include <queue> #include <string> #include <thread> #include <ucp/api/ucp.h> #include <ucxx/component.h> #includ...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/endpoint.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <netdb.h> #include <memory> #include <string> #include <vector> #include <ucp/api/ucp.h> #include <ucxx/address.h> #include <ucxx/component.h> #include <ucxx/ex...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/header.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <array> #include <string> #include <vector> namespace ucxx { const size_t HeaderFramesSize = 100; class Header { private: /** * @brief Deserialize header....
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/exception.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <exception> #include <string> namespace ucxx { class Error : public std::exception { private: std::string _msg{}; public: explicit Error(const std::string...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/context.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <cstdint> #include <cstring> #include <memory> #include <string> #include <ucp/api/ucp.h> #include <ucxx/component.h> #include <ucxx/config.h> #include <ucxx/con...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/component.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> namespace ucxx { class Component : public std::enable_shared_from_this<Component> { protected: std::shared_ptr<Component> _parent{nullptr}; public:...
0
rapidsai_public_repos/ucxx/cpp/include
rapidsai_public_repos/ucxx/cpp/include/ucxx/request_tag.h
/** * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include <memory> #include <utility> #include <ucp/api/ucp.h> #include <ucxx/delayed_submission.h> #include <ucxx/request.h> #include <ucxx/typedefs.h> namespace ucxx { ...
0