device

dragon.vm.dali.device(
  device_type,
  device_index=0
)[source]

Context-manager to nest the device spec.

Examples:

with dali.device('cuda', 0):
    pass
Parameters:
  • device_type ({'cpu', 'gpu', 'cuda'}, required) The type of device.
  • device_index (int, optional, default=0) The index of the device.