ytm._core.device_config.DeviceConfig#

class ytm._core.device_config.DeviceConfig#

Bases: object

Where and how a model runs.

device: Literal['cpu', 'cuda'] | str = 'cpu:1'#

"cpu[:n_threads]" or "cuda[:gpu_id]". See parse_device().

block_size: int = 256#

CUDA threads per block. Rounded down to a multiple of the warp size and capped at the GPU maximum. Not used on cpu.