소스 검색

benefit from magma 1.4.0 and later being able to use an application-provided stream

Samuel Thibault 10 년 전
부모
커밋
3621a2818e
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      examples/cholesky/cholesky_kernels.c

+ 8 - 0
examples/cholesky/cholesky_kernels.c

@@ -195,13 +195,21 @@ static inline void chol_common_codelet_update_u11(void *descr[], int s, STARPU_A
 			{
 			int ret;
 			int info;
+#if (MAGMA_VERSION_MAJOR > 1) || (MAGMA_VERSION_MAJOR == 1 && MAGMA_VERSION_MINOR >= 4)
+			cublasSetKernelStream(starpu_cuda_get_local_stream());
+			magmablasSetKernelStream(starpu_cuda_get_local_stream());
+#endif
 			ret = magma_spotrf_gpu(MagmaLower, nx, sub11, ld, &info);
 			if (ret != MAGMA_SUCCESS)
 			{
 				fprintf(stderr, "Error in Magma: %d\n", ret);
 				STARPU_ABORT();
 			}
+#if (MAGMA_VERSION_MAJOR > 1) || (MAGMA_VERSION_MAJOR == 1 && MAGMA_VERSION_MINOR >= 4)
+			cudaError_t cures = cudaStreamSynchronize(starpu_cuda_get_local_stream());
+#else
 			cudaError_t cures = cudaThreadSynchronize();
+#endif
 			STARPU_ASSERT(!cures);
 			}
 #else