nvalchemi.distributed.current_dd_context#
- nvalchemi.distributed.current_dd_context()[source]#
Return the live DD context for the current forward.
Inside a
DomainParallel/DistributedModelforward this is the framework’s per-step context (policy, halo metadata, counts). Outside one — single-process code, or before the first forward — it is the inertNOT_DISTRIBUTEDsentinel.Read it in eager code (or under
@torch._dynamo.disable) only. Inside a compiled region the varying fields would bake as stale constants; code there receives what it needs as threaded graph inputs instead.- Return type:
DistributedContext