fused_optimizer

The APIs in this class are open-source APIs of the TorchRec and are not external APIs of the Rec SDK Torch. This section describes the parameter ranges supported by the TorchRec APIs called when the Rec SDK Torch is used.

Function

Returns the fusion optimizer of sparse tables.

Prototype

1
def fused_optimizer()

Return Value

  • Success: Returns the optimizer of the coefficient table.
  • Failure: An exception is thrown.

Sample

1
2
3
from torchrec.distributed.model_parallel import DistributedModelParallel
model = DistributedModelParallel(XXX)
optimizer = model.fused_optimizer