Browse Source

Make sure to take control of the right GPU

Samuel Thibault 13 years ago
parent
commit
dfec7f881c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      doc/chapters/advanced-examples.texi

+ 1 - 0
doc/chapters/advanced-examples.texi

@@ -666,6 +666,7 @@ be given the CUDA pointer at registration, for instance:
 
 	starpu_data_unregister(handle);
 
+	cudaSetDevice(starpu_worker_get_devid(workerid));
 	cudaGraphicsUnmapResources(1, &resource, 0);
 
 	/* Now display it */