static */
| 846 | } |
| 847 | |
| 848 | /* static */ port::Status GpuDriver::SynchronizeStream(GpuContext* context, |
| 849 | GpuStreamHandle stream) { |
| 850 | ScopedActivateContext activated{context}; |
| 851 | CHECK(stream != nullptr); |
| 852 | hipError_t res = tensorflow::wrap::hipStreamSynchronize(stream); |
| 853 | if (res != hipSuccess) { |
| 854 | port::Status status = port::InternalError( |
| 855 | absl::StrCat("could not synchronize on ROCM stream: ", ToString(res))); |
| 856 | LOG(ERROR) << status << " :: " << port::CurrentStackTrace(); |
| 857 | return status; |
| 858 | } |
| 859 | VLOG(2) << "successfully synchronized stream " << stream << " on device " |
| 860 | << context->device_ordinal(); |
| 861 | return port::Status::OK(); |
| 862 | } |
| 863 | |
| 864 | /* static */ bool GpuDriver::IsStreamIdle(GpuContext* context, |
| 865 | GpuStreamHandle stream) { |
nothing calls this directly
no test coverage detected