Hi, the problem is that the backward function expect you to return all gradients for each input argument of forward function.
Since you don’t need gradient for the argument negative_slope, just return None:
@staticmethod
def forward(ctx, input,negative_slope):
    output = input.clamp(min=0)+input.clamp(max=0)*negative_slope
    ctx.save_for_backward(input)
    ctx.slope = negative_slope
    return output
@staticmethod
def backward(ctx, grad_output):
    input, = ctx.saved_tensors
    slope = ctx.slope
    grad_input = grad_output.clone()
    grad_input = grad_input * (input > 0).float() + grad_input * (input < 0).float() * slope
    return grad_input, None

By the way corrected the backward and forward function without testing, hope it works.