Here is my implementation of grid sample 1d. And I also implement grid sample 1d with grid_sample in Pytorch by regarding 1d as a special case of 2d. Overall, my implementation is 2~3x faster in forward pass. Hope it helps~

  
      

      GitHub
  

  
    

GitHub - luo3300612/grid_sample1d: pytorch cuda extension of grid_sample1d 19

  pytorch cuda extension of grid_sample1d. Contribute to luo3300612/grid_sample1d development by creating an account on GitHub.