MCPcopy Create free account
hub / github.com/ml-explore/mlx / PyStreamContext

Method PyStreamContext

python/src/stream.cpp:20–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18class PyStreamContext {
19 public:
20 PyStreamContext(mx::StreamOrDevice s) : _inner(nullptr) {
21 if (std::holds_alternative<std::monostate>(s)) {
22 throw std::runtime_error(
23 "[StreamContext] Invalid argument, please specify a stream or device.");
24 }
25 _s = s;
26 }
27
28 void enter() {
29 _inner = new mx::StreamContext(_s);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected