Shortcuts

SingleHPUStrategy

class pytorch_lightning.strategies.SingleHPUStrategy(device='hpu', accelerator=None, checkpoint_io=None, precision_plugin=None)[source]

Bases: pytorch_lightning.strategies.single_device.SingleDeviceStrategy

Strategy for training on single HPU device.

model_to_device()[source]

Moves the model to the correct device.

Return type

None

setup(trainer)[source]

Setup plugins for the trainer fit and creates optimizers.

Parameters

trainer (Trainer) – the trainer instance

Return type

None

setup_optimizers(trainer)[source]

Creates optimizers and schedulers.

Parameters

trainer (Trainer) – the Trainer, these optimizers should be connected to

Return type

None