Skip to content

Commit 271675a

Browse files
authored
Always define globals to work around a Julia codegen bug (#1832)
1 parent 387d5b1 commit 271675a

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

Manifest.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ version = "0.4.2"
4040

4141
[[CUDA_Driver_jll]]
4242
deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"]
43-
git-tree-sha1 = "a1efe2bfb96c10906dede10f1580aca0ae6d092f"
43+
git-tree-sha1 = "10ca2b63b496edc09258b3de5d1aa64094b18b1d"
4444
uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc"
45-
version = "0.4.0+2"
45+
version = "0.5.0+0"
4646

4747
[[CUDA_Runtime_Discovery]]
4848
deps = ["Libdl"]
49-
git-tree-sha1 = "58dd8ec29f54f08c04b052d2c2fa6760b4f4b3a4"
49+
git-tree-sha1 = "6c8fceaaa6850dea627288ac3bb86fdcdf05e326"
5050
uuid = "1af6417a-86b4-443c-805f-a4643ffb695f"
51-
version = "0.1.1"
51+
version = "0.2.0"
5252

5353
[[CUDA_Runtime_jll]]
5454
deps = ["Artifacts", "CUDA_Driver_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"]
55-
git-tree-sha1 = "96e06a24c89a9945c57278fd09fb717f71476d87"
55+
git-tree-sha1 = "802b1f2220fd43251d343219adf478e6b7992bd4"
5656
uuid = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"
57-
version = "0.4.0+2"
57+
version = "0.5.0+0"
5858

5959
[[ChainRulesCore]]
6060
deps = ["Compat", "LinearAlgebra", "SparseArrays"]

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ AbstractFFTs = "0.4, 0.5, 1.0"
3636
Adapt = "3.3"
3737
BFloat16s = "0.2, 0.3, 0.4"
3838
CEnum = "0.2, 0.3, 0.4"
39-
CUDA_Driver_jll = "0.4"
40-
CUDA_Runtime_Discovery = "0.1"
41-
CUDA_Runtime_jll = "0.4"
39+
CUDA_Driver_jll = "0.5"
40+
CUDA_Runtime_Discovery = "0.2"
41+
CUDA_Runtime_jll = "0.5"
4242
ExprTools = "0.1"
4343
GPUArrays = "8.6"
4444
GPUCompiler = "0.18"

lib/cudadrv/version.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Returns the latest version of CUDA supported by the original system driver, or
2222
`nothing` if the driver was not upgraded.
2323
"""
2424
function system_driver_version()
25-
isdefined(CUDA_Driver_jll, :libcuda_original_version) || return nothing
2625
CUDA_Driver_jll.libcuda_original_version
2726
end
2827

src/initialization.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ function __init__()
3838
# check that we have a driver
3939
global libcuda
4040
if CUDA_Driver_jll.is_available()
41-
if isdefined(CUDA_Driver_jll, :libcuda)
42-
libcuda = CUDA_Driver_jll.libcuda
43-
else
41+
if isnothing(CUDA_Driver_jll.libcuda)
4442
_initialization_error[] = "CUDA driver not found"
4543
return
4644
end
45+
libcuda = CUDA_Driver_jll.libcuda
4746
else
4847
# CUDA_Driver_jll only kicks in for supported platforms, so fall back to
4948
# a system search if the artifact isn't available (JLLWrappers.jl#50)

0 commit comments

Comments
 (0)