Added compile-time flag to disable GPU checks
diff --git a/THCTensor.c b/THCTensor.c
index 8f0a5a7..b32948d 100644
--- a/THCTensor.c
+++ b/THCTensor.c
@@ -759,6 +759,9 @@
 
 int THCudaTensor_checkGPU(THCState *state, unsigned int nTensors, ...)
 {
+#ifdef DISABLE_CHECK_GPU
+  return 1;  // Disable GPU checks.
+#else
   int curDev = -1;
   THCudaCheck(cudaGetDevice(&curDev));
   va_list(args);
@@ -777,4 +780,5 @@
   }
   va_end(args);
   return valid;
+#endif
 }