| 280 | } |
| 281 | |
| 282 | bool CUDABlas::SetStream(Stream *stream) { |
| 283 | CHECK(stream != nullptr); |
| 284 | CHECK(AsGpuStreamValue(stream) != nullptr); |
| 285 | CHECK(blas_ != nullptr); |
| 286 | gpu::ScopedActivateExecutorContext sac{parent_}; |
| 287 | cublasStatus_t ret = cublasSetStream(blas_, AsGpuStreamValue(stream)); |
| 288 | if (ret != CUBLAS_STATUS_SUCCESS) { |
| 289 | LOG(ERROR) << "failed to set stream for cuBLAS calls: " << ToString(ret); |
| 290 | return false; |
| 291 | } |
| 292 | |
| 293 | return true; |
| 294 | } |
| 295 | |
| 296 | cudaStream_t CUDABlas::CUDAStream(Stream* stream) { |
| 297 | CHECK(stream != nullptr); |
nothing calls this directly
no test coverage detected