40. Runtime device API¶
This page documents device utilities exposed from the modssc.runtime package. For configuration context, see the Configuration reference.
40.1 What it is for¶
Device utilities resolve auto device selection based on available torch backends. [1]
40.2 Examples¶
Resolve a device name without importing torch explicitly:
from modssc.runtime.device import resolve_device_name
print(resolve_device_name("auto"))
Resolve with an existing torch module:
import torch
from modssc.runtime.device import resolve_device_name
print(resolve_device_name("auto", torch=torch))
Device resolution logic is implemented in src/modssc/runtime/device.py and re-exported from src/modssc/runtime/__init__.py. [1][2]