瀏覽代碼

Make sure that we are not in exclusive thread mode when using memcpy peer

Samuel Thibault 13 年之前
父節點
當前提交
942609f3bc
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/drivers/cuda/driver_cuda.c

+ 6 - 0
src/drivers/cuda/driver_cuda.c

@@ -124,6 +124,12 @@ static void init_context(int devid)
 	cures = cudaGetDeviceProperties(&props[devid], devid);
 	if (STARPU_UNLIKELY(cures))
 		STARPU_CUDA_REPORT_ERROR(cures);
+#ifdef HAVE_CUDA_MEMCPY_PEER
+	if (props[devid].computeMode == cudaComputeModeExclusive) {
+		fprintf(stderr, "CUDA is in EXCLUSIVE-THREAD mode, but StarPU was built with multithread GPU control support, please reconfigure with --disable-cuda-memcpy-peer\n");
+		STARPU_ASSERT(0);
+	}
+#endif
 
 	limit_gpu_mem_if_needed(devid);