diff options
| author | tgrogers <[email protected]> | 2018-03-25 15:50:13 -0400 |
|---|---|---|
| committer | tgrogers <[email protected]> | 2018-03-25 15:50:13 -0400 |
| commit | db4bd85339caee6a6bd470da1c5f24bc4e8cbe45 (patch) | |
| tree | bc486621b31e0517713bf68f6e484bed85cd57cc /libcuda/cuda_runtime_api.cc | |
| parent | 78a971019b7eac438521c9a77fdf9de30340f29e (diff) | |
succeed if just remining the GPU that pinned memory can beused
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 10 |
1 files changed, 8 insertions, 2 deletions
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) { |
