Shortcuts

CPUAccelerator

class lightning.pytorch.accelerators.CPUAccelerator[source]

Bases: Accelerator

Accelerator for CPU devices.

static auto_device_count()[source]

Get the devices when set to auto.

Return type:

int

get_device_stats(device)[source]

Get CPU stats from psutil package.

Return type:

Dict[str, Any]

static get_parallel_devices(devices)[source]

Gets parallel devices for the Accelerator.

Return type:

List[device]

static is_available()[source]

CPU is always available for execution.

Return type:

bool

static parse_devices(devices)[source]

Accelerator device parsing logic.

Return type:

int

setup_device(device)[source]
Raises:

MisconfigurationException – If the selected device is not CPU.

Return type:

None

teardown()[source]

Clean up any state created by the accelerator.

Return type:

None