By the time you have converted the .c files in src to C++ and ATen, it should be just a matter of replacing the entire file by one of the examples for torch.utils.cpp_extension 1.4k.
Best regards
Thomas