All operations in MLX (including random number generation) take an optional keyword argumentDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ml-explore/mlx/llms.txt
Use this file to discover all available pages before exploring further.
stream. The stream kwarg specifies which stream the operation should run on.
Specifying the Stream
If the stream is unspecified, the operation is run on the default stream of the default device:stream kwarg can also be a Device (e.g., stream=my_device), in which case the operation is run on the default stream of the provided device:
Example Usage
Streams allow for asynchronous execution and can help improve performance by overlapping computation and data transfer.