Solved by ptrblck in post #2 
              
              
                Could you run the code an CPU and check, if you’ll get any errors? Often the error messages for a CPU run are clearer than the CUDA equivalent.