(self, input)
| 1291 | self._mark_uc_metadata() |
| 1292 | |
| 1293 | def forward(self, input): |
| 1294 | self._assert_compiled_if_deferred() |
| 1295 | output = F.embedding(input, |
| 1296 | self.weight, |
| 1297 | padding_idx=self.padding_idx, |
| 1298 | scale_grad_by_freq=self.scale_grad_by_freq) |
| 1299 | if self.is_tp_parallel: |
| 1300 | output = GatherFromTensorParallelRegion.apply(self.mp_group, output, self._partition_sizes) |
| 1301 | if self.embed_scale is not None: |
| 1302 | output = output * self.embed_scale.to(self.weight.dtype) |
| 1303 | return output |
| 1304 | |
| 1305 | @torch.no_grad() |
| 1306 | def gather_params(self, params_list): |
nothing calls this directly
no test coverage detected