| 139 | } |
| 140 | |
| 141 | Status CopyDeviceToAnotherDevice(const std::shared_ptr<CudaContext>& dst_ctx, |
| 142 | uintptr_t dst, uintptr_t src, int64_t nbytes) { |
| 143 | ContextSaver set_temporary(context_); |
| 144 | CU_RETURN_NOT_OK("cuMemcpyPeer", |
| 145 | cuMemcpyPeer(dst, reinterpret_cast<CUcontext>(dst_ctx->handle()), |
| 146 | src, context_, static_cast<size_t>(nbytes))); |
| 147 | return Status::OK(); |
| 148 | } |
| 149 | |
| 150 | Status Synchronize(void) { |
| 151 | ContextSaver set_temporary(context_); |