| 266 | } |
| 267 | |
| 268 | bool CUDABlas::SetWorkspace(Stream* stream, void *workspace, size_t workspaceSizeInBytes) { |
| 269 | CHECK(blas_ != nullptr); |
| 270 | if (!SetStream(stream)) { |
| 271 | return false; |
| 272 | } |
| 273 | cublasStatus_t ret = cublasSetWorkspace(blas_, workspace, workspaceSizeInBytes); |
| 274 | VLOG(2) << "set cublas workspace"; |
| 275 | if (ret != CUBLAS_STATUS_SUCCESS) { |
| 276 | LOG(ERROR) << "failed to set cublas workspace: " << ToString(ret); |
| 277 | return false; |
| 278 | } |
| 279 | return true; |
| 280 | } |
| 281 | |
| 282 | bool CUDABlas::SetStream(Stream *stream) { |
| 283 | CHECK(stream != nullptr); |
no test coverage detected