modosaic.services.device¶
modosaic.services.device ¶
DeviceService ¶
Select a Torch device and default dtype for model execution.
get_device_type
staticmethod
¶
get_device_type()
Return the preferred available Torch device and dtype.
Returns:
| Type | Description |
|---|---|
tuple[device, dtype]
|
A |
Source code in modosaic/services/device.py
7 8 9 10 11 12 13 14 15 16 17 18 19 | |