Accelerator
- class lightning.fabric.accelerators.Accelerator
Bases:
ABCThe Accelerator base class.
An Accelerator is meant to deal with one type of hardware.
Warning
Writing your own accelerator is an experimental feature.
- abstract static auto_device_count()
Get the device count when set to auto.
- Return type:
- abstract static get_parallel_devices(devices)
Gets parallel devices for the Accelerator.
- Return type:
- abstract static is_available()
Detect if the hardware is available.
- Return type:
- abstract static name()
The name of the accelerator.
- Return type:
- abstract static parse_devices(devices)
Accelerator device parsing logic.
- Return type:
- classmethod register_accelerators(accelerator_registry)
Register the accelerator with the registry.
- Return type:
- abstract setup_device(device)
Create and prepare the device for the current process.
- Return type:
- abstract teardown()
Clean up any state created by the accelerator.
- Return type:
Was this page helpful?
Thanks for the feedback.