From db4bd85339caee6a6bd470da1c5f24bc4e8cbe45 Mon Sep 17 00:00:00 2001 From: tgrogers Date: Sun, 25 Mar 2018 15:50:13 -0400 Subject: succeed if just remining the GPU that pinned memory can beused --- libcuda/cuda_runtime_api.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libcuda') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 4f5e0fb..7ee7dbe 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -2104,8 +2104,14 @@ cudaError_t CUDARTAPI cudaSetValidDevices(int *device_arr, int len) cudaError_t CUDARTAPI cudaSetDeviceFlags( int flags ) { - cuda_not_implemented(__my_func__,__LINE__); - return g_last_cudaError = cudaErrorUnknown; + // This flag is implicitly always on (unless you are using the driver API). It is safe for GPGPU-Sim to + // just ignore it. + if ( cudaDeviceMapHost == flags ) { + return g_last_cudaError = cudaSuccess; + } else { + cuda_not_implemented(__my_func__,__LINE__); + return g_last_cudaError = cudaErrorUnknown; + } } size_t getMaxThreadsPerBlock(struct cudaFuncAttributes *attr) { -- cgit v1.3