Make each thread have its own default stream (#3281)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// Copyright © 2023-2025 Apple Inc.
|
||||
|
||||
#include <optional>
|
||||
#include <sstream>
|
||||
|
||||
#include <nanobind/nanobind.h>
|
||||
#include <nanobind/stl/optional.h>
|
||||
#include <nanobind/stl/string.h>
|
||||
#include <nanobind/stl/unordered_map.h>
|
||||
#include <nanobind/stl/variant.h>
|
||||
@@ -80,8 +82,10 @@ void init_device(nb::module_& m) {
|
||||
)pbdoc");
|
||||
m.def(
|
||||
"device_info",
|
||||
&mx::device_info,
|
||||
nb::arg("d") = mx::default_device(),
|
||||
[](std::optional<mx::Device> d) {
|
||||
return mx::device_info(d.value_or(mx::default_device()));
|
||||
},
|
||||
"d"_a = nb::none(),
|
||||
R"pbdoc(
|
||||
Get information about a device.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user