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

Function get_context_parallel_group_rank

sat/vae_modules/utils.py:63–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61
62
63def get_context_parallel_group_rank():
64 assert _CONTEXT_PARALLEL_SIZE is not None, "context parallel size is not initialized"
65
66 rank = torch.distributed.get_rank()
67 cp_group_rank = rank // _CONTEXT_PARALLEL_SIZE
68
69 return cp_group_rank
70
71
72class SafeConv3d(torch.nn.Conv3d):

Callers 5

_pass_from_previous_rankFunction · 0.90
get_inputMethod · 0.90
encodeMethod · 0.90
decodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected