By removing all long tensors,
class GraphConvolution(nn.Module):

    def __init__(self, in_features, out_features, bias=True):
        super(GraphConvolution, self).__init__()

        self.in_features = in_features
        self.out_features = out_features
        self.weight = nn.parameter.Parameter(torch.FloatTensor(in_features, out_features))
        if bias:
            self.bias = nn.parameter.Parameter(torch.FloatTensor(out_features))
        else:
            self.register_parameter('bias', None)
        self.reset_parameters()

    def reset_parameters(self):
        stdv = 1. / math.sqrt(self.weight.size(1))
        self.weight.data.uniform_(-stdv, stdv)
        if self.bias is not None:
            self.bias.data.uniform_(-stdv, stdv)

    def forward(self, x, adj):
        support = torch.mm(x, self.weight.long())
        output = torch.spmm(adj, support)
        return output

    def __repr__(self):
        return self.__class__.__name__ + ' (' \
               + str(self.in_features) + ' -> ' \
               + str(self.out_features) + ')'

class GCN(nn.Module):
    def __init__(self, nfeat, nhid, nclass):
        super(GCN, self).__init__()

        self.gc1 = GraphConvolution(nfeat, nhid)
        self.gc2 = GraphConvolution(nhid, nclass)
        self.dp = nn.Dropout(p=0.5)

    def forward(self, x, adj):
        x = F.relu(self.gc1(x, adj))
        x = self.dp(x.float())
        x = self.gc2(x, adj)
        return torch.sum(F.log_softmax(x, dim=1), dim=1)

def train(epoch):
    t = time.time()
    model.train()
    optimizer.zero_grad()
    output = model(features, adj)
    print("Output = ",output.size())
    loss_train = criteria(output, adj_comp) 
    loss_train.backward()
    optimizer.step()

    
    print('Epoch: {:04d}'.format(epoch+1),
          'loss_train: {:.4f}'.format(loss_train.item()),
          'time: {:.4f}s'.format(time.time() - t))
    

adj = torch.randint(high=10, size=(100,100)).long()
features = torch.sum(adj, dim=1).view(1,-1).long()
features = torch.transpose(features,0,1)

adj_comp= torch.randint(high=10, size=(100,)).long()
print("adj_comp = ",adj_comp.size())

model = GCN(nfeat=features.shape[1],
            nhid=9,
            nclass=8)

criteria = nn.MSELoss()
optimizer = optim.Adam(model.parameters(), lr=0.1, weight_decay= 5e-4)

for epoch in range(10):
    train(epoch)

there is an error of Expected object of scalar type Float but got scalar type Long for argument #2 ‘mat2’ in call to _th_mm in the line x = self.gc2(x, adj) .
This is why I had converted the tensors to long as the matrix multiplication was feasible, but it began breaking the gradient computation.
How to proceed on this without converting to long tensors and preserving the gradients as well?