diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-01-17 12:28:27 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-17 12:51:25 -0800 |
commit | 21c0fa9e2dd966c242a4e89f1cac9e3e0f146ea8 (patch) | |
tree | dafb27008ba040280825c18d10e0bef02d68187c /tensorflow/stream_executor/cuda/cuda_driver.h | |
parent | c276876a4ab1ebedf2b847d9ac12d019d6a16cff (diff) |
Plumb port::Status through the internal synchronous memcopy routines.
Now, at least for the public APIs that return port::Status, they can grab the
port::Status that the implementation would like to return and use its
additional information in reporting to the user.
Change: 144741667
Diffstat (limited to 'tensorflow/stream_executor/cuda/cuda_driver.h')
-rw-r--r-- | tensorflow/stream_executor/cuda/cuda_driver.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tensorflow/stream_executor/cuda/cuda_driver.h b/tensorflow/stream_executor/cuda/cuda_driver.h index ab118e5d40..c5d7d8b32f 100644 --- a/tensorflow/stream_executor/cuda/cuda_driver.h +++ b/tensorflow/stream_executor/cuda/cuda_driver.h @@ -251,12 +251,14 @@ class CUDADriver { // -- Synchronous memcopies. // http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g4d32266788c440b0220b1a9ba5795169 - static bool SynchronousMemcpyD2H(CudaContext* context, void *host_dst, - CUdeviceptr gpu_src, uint64 size); - static bool SynchronousMemcpyH2D(CudaContext* context, CUdeviceptr gpu_dst, - const void *host_src, uint64 size); - static bool SynchronousMemcpyD2D(CudaContext* context, CUdeviceptr gpu_dst, - CUdeviceptr gpu_src, uint64 size); + static port::Status SynchronousMemcpyD2H(CudaContext* context, void* host_dst, + CUdeviceptr gpu_src, uint64 size); + static port::Status SynchronousMemcpyH2D(CudaContext* context, + CUdeviceptr gpu_dst, + const void* host_src, uint64 size); + static port::Status SynchronousMemcpyD2D(CudaContext* context, + CUdeviceptr gpu_dst, + CUdeviceptr gpu_src, uint64 size); // -- Asynchronous memcopies. // http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g56f30236c7c5247f8e061b59d3268362 |