mlx.core.new_thread_unsafe_stream#
- new_thread_unsafe_stream(device: Device | DeviceType) Stream#
Make a new stream that can be used in any thread.
Unlike
new_stream()which can only work on the thread of creation, streams created by this API can be passed to and evaluated anywhere, but note that currently all nodes in a graph must be evaluated in sequence and it is user’s responsibilty to ensure there is no race condition.