Solved by ptrblck in post #6 
              
              
                I was wrong and a device guard is needed for custom CUDA extensions. 
Here is the diff to make the example executable on a non-default device: 
diff --git a/cuda/lltm_cuda.cpp b/cuda/lltm_cuda.cpp
index 2434776..62c9628 100644
--- a/cuda/lltm_cuda.cpp
+++ b/cuda/lltm_cuda.cpp
@@ -1,5 +1,5 @@
 #inclu…