title: Code working on windows but launch failures on Linux
body: <p>First and foremost: I am completely unable to create a MCVE, as I can only reproduce this when running a full code, any attempt to measure or replicate the error in a simpler environment makes it disappear. TDLR I suspect its not a code problem, but a configuration problem.</p>
  
  <hr>
  
  <p>I have a piece of code for some mathematics on kernels in CUDA. I have a windows machine Win10 x64, GTX 1050, CUDA 9.2 and a Ubuntu 17.04, 2xGTX 1080 Ti, CUDA 9.1.</p>
  
  <p>My code runs good on the windows machine. It is long (~700ms per kernel call for big samples) so I needed to increase the TDR value in windows. The code also (for now) forces it to run in 1 GPU, the first one that is selected with <code>cudaSetDevice(0)</code>. </p>
  
  <p>When I copy the same input data and code to the linux machine (I am using git, it is the same code), I get either</p>
  
  <pre><code> an illegal memory access was encountered
  </code></pre>
  
  <p>or</p>
  
  <pre><code> unspecified launch failure
  </code></pre>
  
  <p>in my error checking after the GPU call.</p>
  
  <p>If I change the kernel to instead do the math, to just write a number in the output, the kernel executes properly. Other CUDA code (different functions that I have) works fine too.  All this leads me to think that there is a problem outside the code, not with the code itself, nor with the general configuration of the drivers/environment variables. </p>
  
  <p>I read that the <code>xorg.conf</code> can have an effect on the timeout of the kernels. I generated a xorg.conf (I had none) and remove the devices from there, as suggested <a href="https://devtalk.nvidia.com/default/topic/1025796/cuda-programming-and-performance/kernel-crashed-due-to-quot-unspecified-launch-failure-quot-on-cuda-9-but-not-cuda-8/" rel="nofollow noreferrer">here</a>. I am connecting to the server remotely, and have no monitor plugged in. This changes nothing in the behavior, my kernels still error. </p>
  
  <p>My question is: what else should I look? What linux specific configuration should I have a look at to pinpoint the cause of the kernel halts?  </p>