Skip to content

Commit 50ea789

Browse files
committed
Reactant_jll build 0.0.12+2
1 parent 694b88f commit 50ea789

File tree

3 files changed

+69
-6
lines changed

3 files changed

+69
-6
lines changed

.pkg/platform_augmentation.jl

+64-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,70 @@ else
1515
end
1616

1717
module __CUDA
18-
$(CUDA.augment::String)
18+
using Base.BinaryPlatforms
19+
20+
try
21+
using CUDA_Runtime_jll
22+
catch
23+
# during initial package installation, CUDA_Runtime_jll may not be available.
24+
# in that case, we just won't select an artifact.
25+
end
26+
27+
# can't use Preferences for the same reason
28+
const CUDA_Runtime_jll_uuid = Base.UUID("76a88914-d11a-5bdc-97e0-2f5a05c973a2")
29+
const preferences = Base.get_preferences(CUDA_Runtime_jll_uuid)
30+
Base.record_compiletime_preference(CUDA_Runtime_jll_uuid, "version")
31+
Base.record_compiletime_preference(CUDA_Runtime_jll_uuid, "local")
32+
const local_toolkit = something(tryparse(Bool, get(preferences, "local", "false")), false)
33+
34+
function cuda_comparison_strategy(_a::String, _b::String, a_requested::Bool, b_requested::Bool)
35+
# if we're using a local toolkit, we can't use artifacts
36+
if local_toolkit
37+
return false
38+
end
39+
40+
# if either isn't a version number (e.g. "none"), perform a simple equality check
41+
a = tryparse(VersionNumber, _a)
42+
b = tryparse(VersionNumber, _b)
43+
if a === nothing || b === nothing
44+
return _a == _b
45+
end
46+
47+
# if both b and a requested, then we fall back to equality
48+
if a_requested && b_requested
49+
return Base.thisminor(a) == Base.thisminor(b)
50+
end
51+
52+
# otherwise, do the comparison between the the single version cap and the single version:
53+
function is_compatible(artifact::VersionNumber, host::VersionNumber)
54+
if host >= v"11.0"
55+
# enhanced compatibility, semver-style
56+
artifact.major == host.major &&
57+
Base.thisminor(artifact) <= Base.thisminor(host)
58+
else
59+
Base.thisminor(artifact) == Base.thisminor(host)
60+
end
61+
end
62+
if a_requested
63+
is_compatible(b, a)
64+
else
65+
is_compatible(a, b)
66+
end
67+
end
68+
69+
function augment_platform!(platform::Platform)
70+
if !@isdefined(CUDA_Runtime_jll)
71+
# don't set to nothing or Pkg will download any artifact
72+
platform["cuda"] = "none"
73+
end
74+
75+
if !haskey(platform, "cuda")
76+
CUDA_Runtime_jll.augment_platform!(platform)
77+
end
78+
BinaryPlatforms.set_compare_strategy!(platform, "cuda", cuda_comparison_strategy)
79+
80+
return platform
81+
end
1982
end
2083

2184
function augment_platform!(platform::Platform)

Artifacts.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[[Reactant]]
22
arch = "x86_64"
33
cxxstring_abi = "cxx03"
4-
git-tree-sha1 = "b82b45674ec50aba972c7625f1443fcbfd79d382"
4+
git-tree-sha1 = "765d1b27db5a2d78dd402fb052f7f52880bc9a0b"
55
lazy = true
66
libc = "glibc"
77
mode = "opt"
88
os = "linux"
99

1010
[[Reactant.download]]
11-
sha256 = "1a5491a6139c5915071c78093ad40edb17f0438e788a5eeb8aed75bc04d4c37d"
11+
sha256 = "c1301d19e822fb7a63aa18931511c0070f8b677f6cfbe27f0f96d1fa5566a129"
1212
url = "https://github.com/JuliaBinaryWrappers/Reactant_jll.jl/releases/download/Reactant-v0.0.12+2/Reactant.v0.0.12.x86_64-linux-gnu-cxx03-mode+opt.tar.gz"
1313
[[Reactant]]
1414
arch = "x86_64"
1515
cxxstring_abi = "cxx11"
16-
git-tree-sha1 = "cc0cc2e07262e90ad6964f4d886c2b2a0fadb34b"
16+
git-tree-sha1 = "9db0da10580d957bfb8b352f7498c0fe652f8ec3"
1717
lazy = true
1818
libc = "glibc"
1919
mode = "opt"
2020
os = "linux"
2121

2222
[[Reactant.download]]
23-
sha256 = "4b9537e1c955d52059c9dc427fcf091bd046d1c24fd5220c6a037bba88be5ecf"
23+
sha256 = "a24dcd6861e2b2aa52cdddbe55f00aaf16dee0c894b99ea37731c9c49cd6304f"
2424
url = "https://github.com/JuliaBinaryWrappers/Reactant_jll.jl/releases/download/Reactant-v0.0.12+2/Reactant.v0.0.12.x86_64-linux-gnu-cxx11-mode+opt.tar.gz"
2525
[[Reactant]]
2626
arch = "x86_64"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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/e3b5baf5c84aa18ba7c5c40d0889b010d96ece15/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/2ef40914ce40be57f069b68921c5cfaa2032bff9/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

0 commit comments

Comments
 (0)