diff --git a/python/src/docstrings.hpp b/python/src/docstrings.hpp index 6b3a1dc78..79b864f8b 100644 --- a/python/src/docstrings.hpp +++ b/python/src/docstrings.hpp @@ -119,7 +119,7 @@ integrate with the vulkan kompute use. @param device Vulkan logical device to use for all base resources @param physicalDeviceIndex Index for vulkan physical device used)doc"; -static const char *__doc_kp_Manager_buildTensor = +static const char *__doc_kp_Manager_tensor = R"doc(Function that simplifies the common workflow of tensor creation and initialization. It will take the constructor parameters for a Tensor and will will us it to create a new Tensor and then create it using @@ -133,15 +133,6 @@ static const char *__doc_kp_Manager_createDevice = R"doc()doc"; static const char *__doc_kp_Manager_createInstance = R"doc()doc"; -static const char *__doc_kp_Manager_createManagedSequence = -R"doc(Create a new managed Kompute sequence so it's available within the -manager. - -@param sequenceName The name for the named sequence to be created, if -empty then default indexed value is used @param queueIndex The queue -to use from the available queues @return Weak pointer to the manager -owned sequence resource)doc"; - static const char *__doc_kp_Manager_evalOp = R"doc(Function that evaluates operation against named sequence. @@ -187,7 +178,7 @@ R"doc(Function that evaluates operation against a newly created sequence. TArgs Template parameters that will be used to initialise Operation to allow for extensible configurations on initialisation)doc"; -static const char *__doc_kp_Manager_getOrCreateManagedSequence = +static const char *__doc_kp_Manager_sequence = R"doc(Get or create a managed Sequence that will be contained by this manager. If the named sequence does not currently exist, it would be created and initialised. diff --git a/python/src/main.cpp b/python/src/main.cpp index 74f010f0a..889084c7e 100644 --- a/python/src/main.cpp +++ b/python/src/main.cpp @@ -155,14 +155,16 @@ PYBIND11_MODULE(kp, m) { [](uint32_t physicalDeviceIndex, const std::vector& familyQueueIndices) { return std::unique_ptr(new kp::Manager(physicalDeviceIndex, familyQueueIndices)); }), "Manager initialiser can provide specified device and array of GPU queueFamilies to load.") - .def("get_create_sequence", &kp::Manager::getOrCreateManagedSequence, "Get a Sequence or create a new one with given name") - .def("create_sequence", &kp::Manager::createManagedSequence, - py::arg("name") = "", py::arg("queueIndex") = 0, "Create a sequence with specific name and specified index of available queues") - .def("build_tensor", &kp::Manager::buildTensor, + .def("sequence", &kp::Manager::sequence, + py::arg("name") = "", py::arg("queueIndex") = 0, "Get or create a sequence with specific name and specified index of available queues") + .def("tensor", &kp::Manager::tensor, py::arg("data"), py::arg("tensorType") = kp::Tensor::TensorTypes::eDevice, py::arg("syncDataToGPU") = true, "Build and initialise tensor") - .def("rebuild_tensors", &kp::Manager::rebuildTensors, + .def("rebuild", py::overload_cast>, bool>(&kp::Manager::rebuild), py::arg("tensors"), py::arg("syncDataToGPU") = true, + "Build and initialise list of tensors") + .def("rebuild", py::overload_cast, bool>(&kp::Manager::rebuild), + py::arg("tensor"), py::arg("syncDataToGPU") = true, "Build and initialise tensor") // Await functions