I guess this method is good for custom functions. For the functions already included in PyTorch, a python binding should be generated at compilation. Although this is not the case for some of them at present time I believe…
Are you doing your own custom function with cuda?
Did you manage to compile it with jit?