Explorar o código

We don't use pitch'ed allocation for the matrix interface anymore: when people
submit contiguous data buffers, it's really unexpected if they obtain a strided
buffer. Also, this has never shown any significant performance boost, so it
seems reasonnable to remove this optimization.

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
ffa8095b25
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/datawizard/interfaces/matrix_interface.c

+ 2 - 2
src/datawizard/interfaces/matrix_interface.c

@@ -277,7 +277,7 @@ static size_t allocate_matrix_buffer_on_node(void *interface_, uint32_t dst_node
 			break;
 #ifdef STARPU_USE_CUDA
 		case STARPU_CUDA_RAM:
-			status = cudaMallocPitch((void **)&addr, &pitch, (size_t)nx*elemsize, (size_t)ny);
+			status = cudaMalloc((void **)&addr, (size_t)nx*ny*elemsize);
 			if (!addr || status != cudaSuccess)
 			{
 				if (STARPU_UNLIKELY(status != cudaErrorMemoryAllocation))
@@ -286,7 +286,7 @@ static size_t allocate_matrix_buffer_on_node(void *interface_, uint32_t dst_node
 				fail = 1;
 			}
 
-			ld = (uint32_t)(pitch/elemsize);
+			ld = nx;
 
 			break;
 #endif