github.com
  
  
    pytorch/pytorch/blob/6dfecc7e01842bb7e5024794fdce94480de7bb3a/tools/autograd/derivatives.yaml#L415-L417 5

- name: index_select(Tensor self, int dim, Tensor index) -> Tensor
  self: at::zeros(self.sizes(), grad.options()).index_add_(dim, index, grad)
  index: non_differentiable



  
  
    
    
  
  


It is non-differentiable with respect to index.