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

Class ContextParallelGroupNorm

sat/sgm/modules/cp_enc_dec.py:333–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331
332
333class ContextParallelGroupNorm(torch.nn.GroupNorm):
334 def forward(self, input_):
335 if _USE_CP:
336 input_ = conv_gather_from_context_parallel_region(input_, dim=2, kernel_size=1)
337 output = super().forward(input_)
338 if _USE_CP:
339 output = conv_scatter_to_context_parallel_region(output, dim=2, kernel_size=1)
340 return output
341
342
343def Normalize(in_channels, gather=False, **kwargs): # same for 3D and 2D

Callers 2

NormalizeFunction · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected