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