static */
| 967 | } |
| 968 | |
| 969 | /* static */ bool GpuDriver::SynchronizeContext(GpuContext* context) { |
| 970 | ScopedActivateContext activation(context); |
| 971 | CUresult res = cuCtxSynchronize(); |
| 972 | if (res != CUDA_SUCCESS) { |
| 973 | LOG(ERROR) << "could not synchronize on CUDA context: " << ToString(res) |
| 974 | << " :: " << port::CurrentStackTrace(); |
| 975 | return false; |
| 976 | } |
| 977 | |
| 978 | return true; |
| 979 | } |
| 980 | |
| 981 | /* static */ port::Status GpuDriver::SynchronizeStream(GpuContext* context, |
| 982 | CUstream stream) { |
nothing calls this directly
no test coverage detected