This might be a dumb question, but I have a similar scenario and want to give multiple outputs from my custom forward function similar to what mordith was doing. One of these will need to be differentiated but the others will not. For example,
def forward(ctx, input)
…
return differentiated_output, non_differentiated_output_for_diagnostics, another_one