This commit is contained in:
Binyang Li
2023-08-18 07:28:17 +00:00
parent 774a0104d7
commit b40cda8651
2 changed files with 5 additions and 9 deletions

View File

@@ -516,15 +516,6 @@ class Communicator {
/// @return RegisteredMemory A handle to the buffer.
RegisteredMemory registerMemory(void* ptr, size_t size, TransportFlags transports);
/// Register a region of GPU memory for use in this communicator.
///
/// @param ptr Base pointer to the memory.
/// @param size Size of the memory region in bytes.
/// @param pitchSize pitch size of the memory region in bytes. (used for 2D communication)
/// @param transports Transport flags.
/// @return RegisteredMemory A handle to the buffer.
RegisteredMemory registerMemory(void* ptr, size_t size, size_t pitchSize, TransportFlags transports);
/// Send information of a registered memory to the remote side on setup.
///
/// This function registers a send to a remote process that will happen by a following call of @ref setup(). The send

View File

@@ -2,6 +2,7 @@
// Licensed under the MIT license.
#include <nanobind/nanobind.h>
#include <nanobind/stl/pair.h>
#include <nanobind/stl/shared_ptr.h>
#include <nanobind/stl/string.h>
@@ -22,6 +23,10 @@ void register_proxy_channel(nb::module_& m) {
.def("build_and_add_semaphore",
nb::overload_cast<Communicator&, std::shared_ptr<Connection>>(&ProxyService::buildAndAddSemaphore),
nb::arg("comm"), nb::arg("connection"))
.def("build_and_add_semaphore",
nb::overload_cast<Communicator&, std::shared_ptr<Connection>, std::pair<uint64_t, uint64_t>>(
&ProxyService::buildAndAddSemaphore),
nb::arg("comm"), nb::arg("connection"), nb::arg("pitch"))
.def("add_semaphore", &ProxyService::addSemaphore, nb::arg("semaphore"))
.def("add_memory", &ProxyService::addMemory, nb::arg("memory"))
.def("semaphore", &ProxyService::semaphore, nb::arg("id"))