Devices and Streams#

Device

A device to run operations on.

Stream

A stream for running operations on a given device.

default_device()

Get the default device.

set_default_device(device)

Set the default device.

default_stream(device)

Get the device's default stream.

new_stream(device)

Make a new stream on the given device.

set_default_stream(stream)

Set the default stream.

stream(s)

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

synchronize([stream])

Synchronize with the given stream.