(self, input_: torch.Tensor)
| 16 | ) |
| 17 | |
| 18 | def forward_ColumnParallelLinear(self, input_: torch.Tensor) -> torch.Tensor: # type: ignore |
| 19 | # Set up backprop all-reduce. |
| 20 | input_parallel = copy_to_model_parallel_region(input_) |
| 21 | # Matrix multiply. |
| 22 | output_parallel = self.quanted_layer(input_parallel) |
| 23 | if self.bias is not None: |
| 24 | output_parallel = output_parallel + self.bias |
| 25 | if self.gather_output: |
| 26 | # All-gather across the partitions. |
| 27 | output = gather_from_model_parallel_region(output_parallel) |
| 28 | else: |
| 29 | output = output_parallel |
| 30 | return output |
| 31 | |
| 32 | def forward_RowParallelLinear(self, input_: torch.Tensor) -> torch.Tensor: # type:ignore |
| 33 | # Set up backprop all-reduce. |
nothing calls this directly
no outgoing calls
no test coverage detected