SingleDeviceXLAStrategy

class lightning.pytorch.strategies.SingleDeviceXLAStrategy(device, accelerator=None, checkpoint_io=None, precision_plugin=None, debug=False)[source]

Bases: SingleDeviceStrategy

Strategy for training on a single XLA device.

setup(trainer)[source]

Sets up the accelerator, plugins and initializes the optimizers (if needed).

Parameters:

trainer (Trainer) – the trainer instance

Return type:

None

teardown()[source]

This method is called to teardown the training process.

It is the right place to release memory and free other resources.

Return type:

None