MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / get_context_parallel_rank

Function get_context_parallel_rank

sat/sgm/util.py:62–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def get_context_parallel_rank():
63 assert _CONTEXT_PARALLEL_SIZE is not None, "context parallel size is not initialized"
64
65 rank = torch.distributed.get_rank()
66 cp_rank = rank % _CONTEXT_PARALLEL_SIZE
67 return cp_rank
68
69
70def get_context_parallel_group_rank():

Callers 7

_splitFunction · 0.50
_gatherFunction · 0.50
_conv_splitFunction · 0.50
_conv_gatherFunction · 0.50
_pass_from_previous_rankFunction · 0.50
forwardMethod · 0.50
forwardMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected