[Solved]Can not run cuda code with driver 368.39

My code is running well with driver version 353.90 on TITAN X, but cuda code is crashed when i used GTX 1080 and updated driver to 368.39 version. My step is:
0. Cuda is running well with TITAN X, driver’s version is 353.90, CUDA’s version is 7.5.

  1. Remove TITAN X, insert GTX 1080 and update drivers to 368.90. --> cuda code crashed.
  2. Install CUDA 8.0RC. --> cuda code still crashed.
  3. Remove GTX 1080 and insert TITAN X. --> cuda code still crashed.
  4. Remove CUDA 8.0RC, Reinstall CUDA 7.5, roll back driver’s version to 353.90, still using TITAN X. --> cuda code runs OK.

Code is crashed as something belows:

uchar4 kernel(int x, int y)
  uchar4 V;
  V.x = x;
  V.y = y;


  return V;


When i use NSIGHT debug to check memory then i received “error = Access violation on store” in line 4.
I’m using Visual Studio 2013 on Windows 7 64bit.
CUDA 7.5 and 8.0.

I don’t know what’s wrong with this, can anyone help me?

Really thank for your help.

I checked with old version of program using console application, cuda code run OK. But with MFC application version, it’s crashed as above. Does version 368.90 has problem with MFC application? Does anyone has problem like me? :(