@staticmethod
def backward(ctx, grad_output):
    (inputs, weight, adj_matrix) = ctx.saved_tensors
    btype = ctx.btype
    am_partitions = ctx.am_partitions
    with torch.set_grad_enabled(True):
        func_eval = ctx.activation_func(ctx.z)
        sigmap = torch.autograd.grad(outputs=func_eval, inputs=ctx.z, grad_outputs=grad_output)[0]
        grad_output = sigmap
    ag = broad_func(adj_matrix.size(0), am_partitions, grad_output, btype=('backward_' + btype))
    torch.cuda.synchronize()
    g_timer.start(f'gcn_mm_ep{cur_epoch}')
    grad_input = torch.mm(ag, weight.t())
    torch.cuda.synchronize()
    g_timer.stop(f'gcn_mm_ep{cur_epoch}')
    grad_weight = outer_product2(inputs.t(), ag)
    return (grad_input, grad_weight, None, None, None, None, None, None)
@staticmethod
def backward(ctx, grad_output):
    (inputs, weight, adj_matrix) = ctx.saved_tensors
    btype = ctx.btype
    am_partitions = ctx.am_partitions
    with torch.set_grad_enabled(True):
        func_eval = ctx.activation_func(ctx.z)
        sigmap = torch.autograd.grad(outputs=func_eval, inputs=ctx.z, grad_outputs=grad_output)[0]
        grad_output = sigmap
    ag = broad_func(adj_matrix.size(0), am_partitions, grad_output, btype=('backward_' + btype))
    torch.cuda.synchronize()
    g_timer.start(f'gcn_mm_ep{cur_epoch}')
    grad_input = torch.mm(ag, weight.t())
    torch.cuda.synchronize()
    g_timer.stop(f'gcn_mm_ep{cur_epoch}')
    grad_weight = outer_product2(inputs.t(), ag)
    return (grad_input, grad_weight, None, None, None, None, None, None)