(self, input_)
| 231 | stride=stride, return_master_weight=keep_master_weight_for_test) |
| 232 | |
| 233 | def forward(self, input_): |
| 234 | # Set up backprop all-reduce. |
| 235 | input_parallel = copy_to_model_parallel_region(input_) |
| 236 | # Matrix multiply. |
| 237 | output_parallel = F.linear(input_parallel, self.weight, self.bias) |
| 238 | if self.gather_output: |
| 239 | # All-gather across the partitions. |
| 240 | output = gather_from_model_parallel_region(output_parallel) |
| 241 | else: |
| 242 | output = output_parallel |
| 243 | return output |
| 244 | |
| 245 | |
| 246 | class RowParallelLinear(torch.nn.Module): |
nothing calls this directly
no test coverage detected