Devices and Streams

Devices and Streams#

Device(*args, **kwargs)

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.

device_count(device_type)

Get the number of available devices for the given device type.

device_info([d])

Get information about a device.