Solved by ngimel in post #8 
              
              
                You can use something like this https://github.com/ngimel/rnn_ext, it’s more complicated than you need but it shows how to call cublas directly from extension.