Skip to content

novaphy.Device

Device descriptor used by ModelBuilder.finalize(device=...) and by various backend constructors to identify a compute device.

Constructors

Constructor Description
Device() Default CPU device with ordinal 0.
Device.cpu() CPU device.
Device.cuda(ordinal=0) CUDA device with given ordinal.

Attributes

Attribute Description
type Writable DeviceType.
ordinal Writable integer device ordinal (primarily for CUDA).

Device instances support == and != comparisons.

See Also