You are using python list. If you wrap your layers into torch.nn.ModuleList then you can send the model to cuda:
class DeepLinear(nn.Module):
    def __init__(self, dim: int, depth: int):
        super(DeepLinear, self).__init__()
        self.depth = depth
        self.linear = []
        for _ in range(depth):
            self.linear.append(nn.Linear(dim, dim))

        self.linear = nn.ModuleList(self.linear)

    def forward(self, inputs):
        for i in range(self.depth):
            inputs = self.linear[i](inputs)

        return inputs

device = torch.device("cuda:0")
model = DeepLinear(3, 5).to(device)
x = torch.ones(5, 3).to(device)

print(model(x))

which works and prints the following:
tensor([[-0.4190,  0.2145, -0.1509],
        [-0.4190,  0.2145, -0.1509],
        [-0.4190,  0.2145, -0.1509],
        [-0.4190,  0.2145, -0.1509],
        [-0.4190,  0.2145, -0.1509]], device='cuda:0', grad_fn=<AddmmBackward>)