(self, *inputs, **kwargs)
| 178 | self.float16_convertor = float16_convertor |
| 179 | |
| 180 | def forward(self, *inputs, **kwargs): |
| 181 | if mpu.is_pipeline_first_stage(): |
| 182 | inputs = fp32_to_float16(inputs, self.float16_convertor) |
| 183 | outputs = self.module(*inputs, **kwargs) |
| 184 | if mpu.is_pipeline_last_stage(): |
| 185 | outputs = float16_to_fp32(outputs) |
| 186 | return outputs |
| 187 | |
| 188 | def state_dict(self, destination=None, prefix="", keep_vars=False): |
| 189 | return self.module.state_dict(destination, prefix, keep_vars) |
nothing calls this directly
no test coverage detected