SingleDeviceXLAStrategy

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

Bases: SingleDeviceStrategy

Strategy for training on a single XLA device.

setup(trainer)

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

Parameters:

trainer (Trainer) – the trainer instance

Return type:

None

teardown()

This method is called to teardown the training process.

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

Return type:

None