Solved by tom in post #4 
              
              
                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.) 

Not that I know of. 
Best regards 
Tho…