mlx.core.stream

目錄

mlx.core.stream#

stream(s: Stream | ThreadLocalStream | Device | mlx.core.DeviceType) → mlx.core.StreamContext#

Create a context manager to set the default device and stream.

參數:

s -- The Stream or Device to set as the default.

回傳值:

A context manager that sets the default device and stream.

Example: