(ctx, run_function, length, *args)
| 107 | @staticmethod |
| 108 | @torch.cuda.amp.custom_fwd |
| 109 | def forward(ctx, run_function, length, *args): |
| 110 | ctx.run_function = run_function |
| 111 | ctx.input_tensors = list(args[:length]) |
| 112 | ctx.input_params = list(args[length:]) |
| 113 | |
| 114 | with torch.no_grad(): |
| 115 | output_tensors = ctx.run_function(*ctx.input_tensors) |
| 116 | return output_tensors |
| 117 | |
| 118 | @staticmethod |
| 119 | @torch.cuda.amp.custom_bwd # add this |
nothing calls this directly
no outgoing calls
no test coverage detected