Skip to content

Commit 0df64ed

Browse files
authored
Delay all initialization errors until run time. (#2041)
1 parent e39860a commit 0df64ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/initialization.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ function __init__()
102102
runtime_version()
103103
catch err
104104
if err isa CuError && err.code == ERROR_NO_DEVICE
105-
@error "No CUDA-capable device found"
106105
_initialization_error[] = "No CUDA-capable device found"
107106
return
108107
end
@@ -124,8 +123,7 @@ function __init__()
124123
try
125124
cuInit(0)
126125
catch err
127-
@error "Failed to initialize CUDA" exception=(err,catch_backtrace())
128-
_initialization_error[] = "CUDA initialization failed"
126+
_initialization_error[] = "CUDA initialization failed: " * sprint(showerror, err)
129127
return
130128
end
131129

0 commit comments

Comments
 (0)