()
| 61 | |
| 62 | |
| 63 | def 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 | |
| 72 | class SafeConv3d(torch.nn.Conv3d): |
no outgoing calls
no test coverage detected