소스 검색

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);