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

Function get_context_parallel_group_rank

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

Source from the content-addressed store, hash-verified

68
69
70def get_context_parallel_group_rank():
71 assert _CONTEXT_PARALLEL_SIZE is not None, "context parallel size is not initialized"
72
73 rank = torch.distributed.get_rank()
74 cp_group_rank = rank // _CONTEXT_PARALLEL_SIZE
75
76 return cp_group_rank
77
78
79class SafeConv3d(torch.nn.Conv3d):

Callers 4

_pass_from_previous_rankFunction · 0.50
get_inputMethod · 0.50
encodeMethod · 0.50
decodeMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected