Add synchronize function (#1006)

* add synchronize function

* fix linux

* fix linux

* fix and fix docs

* fix test

* try synchronize in stream destroy

* synchronize works for both cpu and gpu
This commit is contained in:
Awni Hannun
2024-04-22 08:25:46 -07:00
committed by GitHub
parent b0012cdd0f
commit 3d405fb3b1
14 changed files with 95 additions and 23 deletions

View File

@@ -2,6 +2,7 @@
#include "mlx/backend/metal/metal.h"
#include <nanobind/nanobind.h>
#include <nanobind/stl/optional.h>
#include <nanobind/stl/string.h>
namespace nb = nanobind;
@@ -99,9 +100,6 @@ void init_metal(nb::module_& m) {
Args:
path (str): The path to save the capture which should have
the extension ``.gputrace``.
Returns:
bool: Whether the capture was successfully started.
)pbdoc");
metal.def(
"stop_capture",