Skip to content

Commit 74b8cb5

Browse files
committed
Reactant_jll build 0.0.40+0
1 parent aa63b05 commit 74b8cb5

File tree

4 files changed

+41
-14
lines changed

4 files changed

+41
-14
lines changed

.pkg/platform_augmentation.jl

+30-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,26 @@ else
2727
nothing
2828
end
2929

30+
# copied from CUDA_Runtime_jll
31+
function cudaRuntimeGetVersion(library_handle)
32+
function_handle = Libdl.dlsym(library_handle, "cudaRuntimeGetVersion"; throw_error=false)
33+
if function_handle === nothing
34+
@debug "Runtime library seems invalid (does not contain 'cudaRuntimeGetVersion')"
35+
return nothing
36+
end
37+
version_ref = Ref{Cint}()
38+
status = ccall(function_handle, Cint, (Ptr{Cint},), version_ref)
39+
if status != 0
40+
@debug "Call to 'cudaRuntimeGetVersion' failed with status $(status)"
41+
return nothing
42+
end
43+
major, ver = divrem(version_ref[], 1000)
44+
minor, patch = divrem(ver, 10)
45+
version = VersionNumber(major, minor, patch)
46+
@debug "Detected CUDA Runtime version $(version)"
47+
return version
48+
end
49+
3050
function augment_platform!(platform::Platform)
3151

3252
mode = get(ENV, "REACTANT_MODE", something(mode_preference, "opt"))
@@ -52,12 +72,19 @@ function augment_platform!(platform::Platform)
5272
# so that we get recompiled if the driver changes.
5373
if cuname != "" && gpu == "undecided"
5474
handle = Libdl.dlopen(cuname)
75+
cuda_version = cuDriverGetVersion(handle)
5576
path = Libdl.dlpath(handle)
5677
Libdl.dlclose(handle)
5778

58-
@debug "Adding include dependency on $path"
59-
Base.include_dependency(path)
60-
gpu = "cuda"
79+
if cuda_version isa VersionNumber
80+
if cuda_version >= v"12.6"
81+
@debug "Adding include dependency on $path"
82+
Base.include_dependency(path)
83+
gpu = "cuda"
84+
else
85+
@debug "CUDA version $(cuda_version) not supported with this version of Reactant"
86+
end
87+
end
6188
end
6289

6390
roname = ""

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Reactant_jll"
22
uuid = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0"
3-
version = "0.0.39+0"
3+
version = "0.0.40+0"
44

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

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# `Reactant_jll.jl` (v0.0.39+0)
1+
# `Reactant_jll.jl` (v0.0.40+0)
22

33
[![deps](https://juliahub.com/docs/Reactant_jll/deps.svg)](https://juliahub.com/ui/Packages/General/Reactant_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/5a30daca3957726d6e135cd941ca645498e4826a/R/Reactant/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/ec19ed63a699b25f44d32ae712d1a796d2d6c8b0/R/Reactant/build_tarballs.jl) script can be found on [`Yggdrasil`](https://github.com/JuliaPackaging/Yggdrasil/), the community build tree.
88

99
## Bug Reports
1010

@@ -18,7 +18,7 @@ For more details about JLL packages and how to use them, see `BinaryBuilder.jl`
1818

1919
The tarballs for `Reactant_jll.jl` have been built from these sources:
2020

21-
* git repository: https://github.com/EnzymeAD/Reactant.jl.git (revision: `eef65ce615a95f02b3b3c3c507f4f856161b7208`)
21+
* git repository: https://github.com/EnzymeAD/Reactant.jl.git (revision: `ab946703ee6935887b7b441fbe16a3dac260fbc0`)
2222
* file: https://github.com/wsmoses/binaries/releases/download/v0.0.1/bazel-dev (SHA256 checksum: `8b43ffdf519848d89d1c0574d38339dcb326b0a1f4015fceaa43d25107c3aade`)
2323

2424
## Platforms
@@ -52,10 +52,10 @@ The code bindings within this package are autogenerated from the following `Prod
5252
* `LibraryProduct`: `libcufft`
5353
* `LibraryProduct`: `libcusolver`
5454
* `LibraryProduct`: `libcusparse`
55-
* `FileProduct`: `libdevice`
5655
* `LibraryProduct`: `libnccl`
5756
* `LibraryProduct`: `libnvJitLink`
5857
* `LibraryProduct`: `libnvrtc`
5958
* `LibraryProduct`: `libnvrtc_builtins`
6059
* `ExecutableProduct`: `fatbinary`
60+
* `FileProduct`: `libdevice`
6161
* `ExecutableProduct`: `ptxas`

src/wrappers/x86_64-linux-gnu-cxx11-gpu+cuda-mode+opt.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ JLLWrappers.@declare_library_product(libcudnn_ops, "libcudnn_ops.so.9")
1818
JLLWrappers.@declare_library_product(libcufft, "libcufft.so.11")
1919
JLLWrappers.@declare_library_product(libcusolver, "libcusolver.so.11")
2020
JLLWrappers.@declare_library_product(libcusparse, "libcusparse.so.12")
21-
JLLWrappers.@declare_file_product(libdevice)
2221
JLLWrappers.@declare_library_product(libnccl, "libnccl.so.2")
2322
JLLWrappers.@declare_library_product(libnvJitLink, "libnvJitLink.so.12")
2423
JLLWrappers.@declare_library_product(libnvrtc, "libnvrtc.so.12")
2524
JLLWrappers.@declare_library_product(libnvrtc_builtins, "libnvrtc-builtins.so.12.6")
2625
JLLWrappers.@declare_executable_product(fatbinary)
26+
JLLWrappers.@declare_file_product(libdevice)
2727
JLLWrappers.@declare_executable_product(ptxas)
2828
function __init__()
2929
JLLWrappers.@generate_init_header(CUDA_Driver_jll)
@@ -117,11 +117,6 @@ function __init__()
117117
nothing,
118118
)
119119

120-
JLLWrappers.@init_file_product(
121-
libdevice,
122-
"lib/cuda/nvvm/libdevice/libdevice.10.bc",
123-
)
124-
125120
JLLWrappers.@init_library_product(
126121
libnccl,
127122
"lib/libnccl.so.2",
@@ -151,6 +146,11 @@ function __init__()
151146
"lib/cuda/bin/fatbinary",
152147
)
153148

149+
JLLWrappers.@init_file_product(
150+
libdevice,
151+
"lib/cuda/nvvm/libdevice/libdevice.10.bc",
152+
)
153+
154154
JLLWrappers.@init_executable_product(
155155
ptxas,
156156
"lib/cuda/bin/ptxas",

0 commit comments

Comments
 (0)