"__managed__ variables require architecture compute_30 or higher" error

I have a GTX 1080 with the latest drivers, cuda toolkit 8.0, and visual studio 2013.

device managed int x, y = 2;
global void kernel() {
x = 10;
int main() {
kernel << <1, 1 >> >();
y = 20; // GPU is idle so access is OK
return 0;

Make sure your build specifies the correct target architecture, the compiler default is sm_20 (i.e., compute capability 2.0). You would want to specify -arch=sm_61 on the nvcc command line when compiling for the GTX 1080. Hint: This is covered in the documentation, which is worth reading.

Thank you, that works!