Skip to content

Commit 0bee465

Browse files
committed
CUDA_Compiler_jll build 0.2.0+1
1 parent 78e5378 commit 0bee465

File tree

4 files changed

+65
-34
lines changed

4 files changed

+65
-34
lines changed

.pkg/platform_augmentation.jl

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,49 @@ using Base.BinaryPlatforms
22

33
using Libdl
44

5-
# before loading CUDA_Driver_jll, try to find out where the system driver is located.
6-
let
7-
name = if Sys.iswindows()
8-
Libdl.find_library("nvcuda")
5+
# re-use the CUDA_Runtime_jll preference to select the appropriate compiler
6+
const CUDA_Runtime_jll_uuid = Base.UUID("76a88914-d11a-5bdc-97e0-2f5a05c973a2")
7+
const preferences = Base.get_preferences(CUDA_Runtime_jll_uuid)
8+
Base.record_compiletime_preference(CUDA_Runtime_jll_uuid, "version")
9+
function parse_version_preference(key)
10+
if haskey(preferences, key)
11+
if isa(preferences[key], String)
12+
version = tryparse(VersionNumber, preferences[key])
13+
if version === nothing
14+
@error "CUDA $key preference is not valid; expected a version number, but got '$(preferences[key])'"
15+
missing
16+
else
17+
version
18+
end
19+
else
20+
@error "CUDA $key preference is not valid; expected a version number, but got '$(preferences[key])'"
21+
missing
22+
end
923
else
10-
Libdl.find_library(["libcuda.so.1", "libcuda.so"])
24+
missing
1125
end
26+
end
27+
const version_preference = parse_version_preference("version")
28+
29+
if ismissing(version_preference)
30+
# before loading CUDA_Driver_jll, try to find out where the system driver is located.
31+
let
32+
name = if Sys.iswindows()
33+
Libdl.find_library("nvcuda")
34+
else
35+
Libdl.find_library(["libcuda.so.1", "libcuda.so"])
36+
end
1237

13-
# if we've found a system driver, put a dependency on it,
14-
# so that we get recompiled if the driver changes.
15-
if name != ""
16-
handle = Libdl.dlopen(name)
17-
path = Libdl.dlpath(handle)
18-
Libdl.dlclose(handle)
38+
# if we've found a system driver, put a dependency on it,
39+
# so that we get recompiled if the driver changes.
40+
if name != ""
41+
handle = Libdl.dlopen(name)
42+
path = Libdl.dlpath(handle)
43+
Libdl.dlclose(handle)
1944

20-
@debug "Adding include dependency on $path"
21-
Base.include_dependency(path)
45+
@debug "Adding include dependency on $path"
46+
Base.include_dependency(path)
47+
end
2248
end
2349
end
2450

@@ -108,14 +134,19 @@ end
108134
# returns the value for the "cuda" tag we should use in the platform ("$MAJOR")
109135
# or nothing if no CUDA driver was found.
110136
function cuda_driver_tag()
111-
cuda_driver = get_driver_version()
112-
if cuda_driver === nothing
113-
@debug "Failed to query CUDA driver version"
114-
return nothing
115-
end
116-
@debug "CUDA driver version: $cuda_driver"
137+
if version_preference !== missing
138+
@debug "CUDA version override: $version_preference"
139+
"$(version_preference.major)"
140+
else
141+
cuda_driver = get_driver_version()
142+
if cuda_driver === nothing
143+
@debug "Failed to query CUDA driver version"
144+
return nothing
145+
end
146+
@debug "CUDA driver version: $cuda_driver"
117147

118-
"$(cuda_driver.major)"
148+
"$(cuda_driver.major)"
149+
end
119150
end
120151

121152
function augment_platform!(platform::Platform)

Artifacts.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ os = "linux"
88

99
[[CUDA_Compiler.download]]
1010
sha256 = "a249766eebae37d103e45c90c331784a3d26633194b2facb259c6fcb29f8ae03"
11-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+11.tar.gz"
11+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+11.tar.gz"
1212
[[CUDA_Compiler]]
1313
arch = "aarch64"
1414
cuda = "11"
@@ -20,7 +20,7 @@ os = "linux"
2020

2121
[[CUDA_Compiler.download]]
2222
sha256 = "4b89ab924dae5e44204fdeedb814fb603f3f8f26fe962d92f212774787744841"
23-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+jetson-cuda+11.tar.gz"
23+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+jetson-cuda+11.tar.gz"
2424
[[CUDA_Compiler]]
2525
arch = "aarch64"
2626
cuda = "11"
@@ -32,7 +32,7 @@ os = "linux"
3232

3333
[[CUDA_Compiler.download]]
3434
sha256 = "fc9c1cd6a93c700f827b1dd484bff0ca2b5ea54e9b1f0bad70bea8517ae1b275"
35-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+sbsa-cuda+11.tar.gz"
35+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+sbsa-cuda+11.tar.gz"
3636
[[CUDA_Compiler]]
3737
arch = "x86_64"
3838
cuda = "11"
@@ -42,7 +42,7 @@ os = "windows"
4242

4343
[[CUDA_Compiler.download]]
4444
sha256 = "4da6c51fab2e0b5a31a5d13fcad2d635691d6f107875914b6d6510879472b2fb"
45-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+11.tar.gz"
45+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+11.tar.gz"
4646
[[CUDA_Compiler]]
4747
arch = "x86_64"
4848
cuda = "12"
@@ -53,7 +53,7 @@ os = "linux"
5353

5454
[[CUDA_Compiler.download]]
5555
sha256 = "bdc82d97b73b7e0e5369f40ca4d9813b314578292a750ce09977280d11eb8da3"
56-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+12.tar.gz"
56+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+12.tar.gz"
5757
[[CUDA_Compiler]]
5858
arch = "aarch64"
5959
cuda = "12"
@@ -65,7 +65,7 @@ os = "linux"
6565

6666
[[CUDA_Compiler.download]]
6767
sha256 = "61a5418b016dd9965eba530186fe68f4b041ef059d2fbb3c24e0ddb235abcdca"
68-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+jetson-cuda+12.tar.gz"
68+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+jetson-cuda+12.tar.gz"
6969
[[CUDA_Compiler]]
7070
arch = "aarch64"
7171
cuda = "12"
@@ -77,7 +77,7 @@ os = "linux"
7777

7878
[[CUDA_Compiler.download]]
7979
sha256 = "07d88f979ce98f74210a90a690b1bb07d7de22455f3ff42cb93597f145ec812d"
80-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+sbsa-cuda+12.tar.gz"
80+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda_platform+sbsa-cuda+12.tar.gz"
8181
[[CUDA_Compiler]]
8282
arch = "x86_64"
8383
cuda = "12"
@@ -87,7 +87,7 @@ os = "windows"
8787

8888
[[CUDA_Compiler.download]]
8989
sha256 = "528c37bc3d53b69446e172381c7978c791731037ed15d4bb7a8a345fac005a54"
90-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+12.tar.gz"
90+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+12.tar.gz"
9191
[[CUDA_Compiler]]
9292
arch = "x86_64"
9393
cuda = "13"
@@ -98,7 +98,7 @@ os = "linux"
9898

9999
[[CUDA_Compiler.download]]
100100
sha256 = "e8385e68ebdcf44b736222fc71c05c3d7eab0fc86002300c41066be5da98b03d"
101-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+13.tar.gz"
101+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-linux-gnu-cuda+13.tar.gz"
102102
[[CUDA_Compiler]]
103103
arch = "aarch64"
104104
cuda = "13"
@@ -109,7 +109,7 @@ os = "linux"
109109

110110
[[CUDA_Compiler.download]]
111111
sha256 = "31038643db6407f2fd061aa9d5a5bb45b78a54b4bb48f7bec104d5ce2cd787f4"
112-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda+13.tar.gz"
112+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.aarch64-linux-gnu-cuda+13.tar.gz"
113113
[[CUDA_Compiler]]
114114
arch = "x86_64"
115115
cuda = "13"
@@ -119,4 +119,4 @@ os = "windows"
119119

120120
[[CUDA_Compiler.download]]
121121
sha256 = "f42a23c40e568b85e384b2e1c888d2431db686ac20dd58ac1cfd6fa4fbf46de1"
122-
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+0/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+13.tar.gz"
122+
url = "https://github.com/JuliaBinaryWrappers/CUDA_Compiler_jll.jl/releases/download/CUDA_Compiler-v0.2.0+1/CUDA_Compiler.v0.2.0.x86_64-w64-mingw32-cuda+13.tar.gz"

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "CUDA_Compiler_jll"
22
uuid = "d1e2174e-dfdc-576e-b43e-73b79eb1aca8"
3-
version = "0.2.0+0"
3+
version = "0.2.0+1"
44

55
[deps]
66
JLLWrappers = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# `CUDA_Compiler_jll.jl` (v0.2.0+0)
1+
# `CUDA_Compiler_jll.jl` (v0.2.0+1)
22

33
[![deps](https://juliahub.com/docs/CUDA_Compiler_jll/deps.svg)](https://juliahub.com/ui/Packages/General/CUDA_Compiler_jll/)
44

55
This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl).
66

7-
The originating [`build_tarballs.jl`](https://github.com/JuliaPackaging/Yggdrasil/blob/f514941be8c2fcdf71c558b7807dbfed14d92d7c/C/CUDA/CUDA_Compiler/build_tarballs.jl) script can be found on [`Yggdrasil`](https://github.com/JuliaPackaging/Yggdrasil/), the community build tree.
7+
The originating [`build_tarballs.jl`](https://github.com/JuliaPackaging/Yggdrasil/blob/4c88a614901272e749a212b40aaf2fa69339ed28/C/CUDA/CUDA_Compiler/build_tarballs.jl) script can be found on [`Yggdrasil`](https://github.com/JuliaPackaging/Yggdrasil/), the community build tree.
88

99
## Bug Reports
1010

0 commit comments

Comments
 (0)