Skip to content

Commit edbb2a4

Browse files
lorenrose1013copybara-github
authored andcommitted
[xla:gpu] improve error when cublas initialization fails.
PiperOrigin-RevId: 499946746
1 parent e853be9 commit edbb2a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xla/stream_executor/cuda/cuda_blas.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ bool CUDABlas::Init() {
217217
cublasStatus_t ret = cublasCreate(&blas_);
218218
if (ret != CUBLAS_STATUS_SUCCESS) {
219219
LOG(ERROR) << "failed to create cublas handle: " << ToString(ret);
220-
if (ret == CUBLAS_STATUS_NOT_INITIALIZED) {
220+
if (ret == CUBLAS_STATUS_NOT_INITIALIZED ||
221+
ret == CUBLAS_STATUS_ALLOC_FAILED) {
221222
LOG(ERROR) << kCublasNotInitializedExplanation;
222223
}
223224
return false;

0 commit comments

Comments
 (0)