x = Variable(torch.randn(1,3),requires_grad=True)
z,_ = torch.max(x,1)
z.backward()
print(x.grad)

Variable containing:
 1  0  0
[torch.FloatTensor of size 1x3]

I understand the max operation is a not differentiable operation. So why can I still get the gradient here?