|
@@ -178,7 +178,7 @@ static void measure_bandwidth_between_host_and_dev_on_numa_with_cuda(int dev, in
|
|
|
/* Allocate a buffer on the device */
|
|
|
unsigned char *d_buffer;
|
|
|
cures = cudaMalloc((void **)&d_buffer, size);
|
|
|
- STARPU_ASSERT(cures == cudaSuccess);
|
|
|
+ if (STARPU_UNLIKELY(cures)) STARPU_CUDA_REPORT_ERROR(cures);
|
|
|
|
|
|
/* hack to avoid third party libs to rebind threads */
|
|
|
_starpu_bind_thread_on_cpu(cpu, STARPU_NOWORKERID, NULL);
|
|
@@ -207,7 +207,7 @@ static void measure_bandwidth_between_host_and_dev_on_numa_with_cuda(int dev, in
|
|
|
cudaHostRegister((void *)h_buffer, size, 0);
|
|
|
}
|
|
|
|
|
|
- STARPU_ASSERT(cures == cudaSuccess);
|
|
|
+ if (STARPU_UNLIKELY(cures)) STARPU_CUDA_REPORT_ERROR(cures);
|
|
|
|
|
|
/* hack to avoid third party libs to rebind threads */
|
|
|
_starpu_bind_thread_on_cpu(cpu, STARPU_NOWORKERID, NULL);
|
|
@@ -332,7 +332,7 @@ static void measure_bandwidth_between_dev_and_dev_cuda(int src, int dst)
|
|
|
/* Allocate a buffer on the device */
|
|
|
unsigned char *s_buffer;
|
|
|
cures = cudaMalloc((void **)&s_buffer, size);
|
|
|
- STARPU_ASSERT(cures == cudaSuccess);
|
|
|
+ if (STARPU_UNLIKELY(cures)) STARPU_CUDA_REPORT_ERROR(cures);
|
|
|
cudaMemset(s_buffer, 0, size);
|
|
|
cudaDeviceSynchronize();
|
|
|
|
|
@@ -358,7 +358,7 @@ static void measure_bandwidth_between_dev_and_dev_cuda(int src, int dst)
|
|
|
/* Allocate a buffer on the device */
|
|
|
unsigned char *d_buffer;
|
|
|
cures = cudaMalloc((void **)&d_buffer, size);
|
|
|
- STARPU_ASSERT(cures == cudaSuccess);
|
|
|
+ if (STARPU_UNLIKELY(cures)) STARPU_CUDA_REPORT_ERROR(cures);
|
|
|
cudaMemset(d_buffer, 0, size);
|
|
|
cudaDeviceSynchronize();
|
|
|
|