During my Machine Learning internship at Amazon, I had the chance to implement my own C++ and CUDA extension. https://pytorch.org/tutorials/advanced/cpp_extension.html is a great start to learn. In this post, I will guide you through the bilinear interpolation operator.