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.
Thank you for replying. I am sorry, but I am not following your suggestion.
The src folder has nms_cuda.c and nms_cuda.h. To my understanding I would need to build the extension from .c sources. Do you mean I have re-write the code in .c to .cpp and Aten? Is this an automatic process with some command?
I am sorry if I might be asking something very trivial.
I think that yes, to use a cpp extension, you need to move to .cpp and ATen. It’s a bit of work, but it certainly is a nicer interface once you get used to it (I think you can cut the size of the code by quite a bit and just keep a couple of files or three.)