瀏覽代碼

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 15 年之前
父節點
當前提交
ffa8095b25
共有 1 個文件被更改,包括 2 次插入2 次删除
  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