()
| 68 | |
| 69 | |
| 70 | def 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 | |
| 79 | class SafeConv3d(torch.nn.Conv3d): |
no outgoing calls
no test coverage detected