File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,18 @@ higher-up depot; to clear preferences nondestructively, use
60
60
"""
61
61
function set_runtime_version! (version:: Union{Nothing,VersionNumber} = nothing ;
62
62
local_toolkit:: Union{Nothing,Bool} = nothing )
63
- if version != = nothing
64
- version = " $(version. major) .$(version. minor) "
63
+ # store stringified properties
64
+ let version = isnothing (version) ? nothing : " $(version. major) .$(version. minor) "
65
+ Preferences. set_preferences! (CUDA_Runtime_jll, " version" => version; force= true )
66
+ end
67
+ let local_toolkit = isnothing (local_toolkit) ? nothing : string (local_toolkit)
68
+ Preferences. set_preferences! (CUDA_Runtime_jll, " local" => local_toolkit; force= true )
65
69
end
66
- Preferences. set_preferences! (CUDA_Runtime_jll, " version" => version; force= true )
67
- Preferences. set_preferences! (CUDA_Runtime_jll, " local" => local_toolkit; force= true )
70
+
68
71
io = IOBuffer ()
69
72
print (io, " Configure the active project to use " )
70
73
if version != = nothing
71
- print (io, " CUDA $version " )
74
+ print (io, " CUDA $( version. major) . $(version . minor) " )
72
75
else
73
76
print (io, " the default CUDA" )
74
77
end
You can’t perform that action at this time.
0 commit comments