Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes from communication, not from the input, so the model's forward_step_func won't have it. This function is thus used by internal code to by
(self, input_tensor: Tensor)
| 197 | } |
| 198 | |
| 199 | def set_input_tensor(self, input_tensor: Tensor): |
| 200 | """Set input tensor to be used instead of forward()'s input. |
| 201 | |
| 202 | When doing pipeline parallelism the input from the previous |
| 203 | stage comes from communication, not from the input, so the |
| 204 | model's forward_step_func won't have it. This function is thus |
| 205 | used by internal code to bypass the input provided by the |
| 206 | forward_step_func""" |
| 207 | self.input_tensor = input_tensor |
| 208 | |
| 209 | def forward( |
| 210 | self, |
nothing calls this directly
no outgoing calls
no test coverage detected