Skip to content

Commit b4d4284

Browse files
authored
Split CUDA.jl into several packages (#3058)
Most CUDA.jl functionality has been moved into CUDACore.jl, and the cuBLAS/cuFFT/cuSPARSE/... library submodules have become proper packages that will be released in lockstep with CUDACore.jl CUDA.jl has become a shim package that imports and re-export all functionality it previously had, so this change should not be breaking.
1 parent 3305986 commit b4d4284

File tree

293 files changed

+5308
-4500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+5308
-4500
lines changed

.buildkite/pipeline.yml

Lines changed: 47 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@ steps:
33
- group: ":julia: Julia"
44
key: "julia"
55
steps:
6+
# Julia 1.10 doesn't support [sources] in Project.toml,
7+
# so we need to manually dev workspace packages before instantiating.
8+
- label: "Julia 1.10"
9+
plugins:
10+
- JuliaCI/julia#v1:
11+
version: "1.10"
12+
- JuliaCI/julia-coverage#v1:
13+
dirs:
14+
- src
15+
- lib
16+
- examples
17+
agents:
18+
queue: "juliagpu"
19+
cuda: "*"
20+
commands: |
21+
echo -e "[CUDA_Runtime_jll]\nlocal = \"true\"" >LocalPreferences.toml
22+
julia --project=. -e '
23+
using Pkg
24+
Pkg.develop([PackageSpec(; path) for path in (
25+
"CUDACore",
26+
"lib/cublas", "lib/cusparse", "lib/cusolver", "lib/cufft", "lib/curand",
27+
"lib/cudnn", "lib/cutensor", "lib/cutensornet", "lib/custatevec"
28+
)])
29+
Pkg.test(; test_args=["--quickfail"])'
30+
if: |
31+
build.message =~ /\[only tests\]/ ||
32+
build.message =~ /\[only julia\]/ ||
33+
build.message !~ /\[only/ &&
34+
build.message !~ /\[skip tests\]/ &&
35+
build.message !~ /\[skip julia\]/
36+
timeout_in_minutes: 90
37+
638
- label: "Julia {{matrix.julia}}"
739
plugins:
840
- JuliaCI/julia#v1:
@@ -30,7 +62,6 @@ steps:
3062
matrix:
3163
setup:
3264
julia:
33-
- "1.10"
3465
- "1.11"
3566
- "1.12"
3667
- "1.13"
@@ -48,9 +79,9 @@ steps:
4879
- label: "CUDA {{matrix.cuda}}"
4980
plugins:
5081
- JuliaCI/julia#v1:
51-
version: "1.11"
82+
version: "1.12"
5283
- JuliaCI/julia-test#v1:
53-
test_args: "--quickfail core base libraries"
84+
test_args: "--quickfail core libraries"
5485
- JuliaCI/julia-coverage#v1:
5586
dirs:
5687
- src
@@ -65,7 +96,7 @@ steps:
6596
build.message !~ /\[only/ && !build.pull_request.draft &&
6697
build.message !~ /\[skip tests\]/ &&
6798
build.message !~ /\[skip cuda\]/
68-
timeout_in_minutes: 60
99+
timeout_in_minutes: 120
69100
matrix:
70101
setup:
71102
cuda:
@@ -85,43 +116,6 @@ steps:
85116
unset LD_LIBRARY_PATH
86117
echo -e "[CUDA_Runtime_jll]\nversion = \"{{matrix.cuda}}\"" >LocalPreferences.toml
87118
88-
- group: ":nesting_dolls: Subpackages"
89-
depends_on: "cuda"
90-
steps:
91-
- label: "{{matrix.package}} on CUDA {{matrix.cuda}}"
92-
matrix:
93-
setup:
94-
cuda:
95-
- "12.0"
96-
- "13.0"
97-
package:
98-
- "cudnn"
99-
- "cutensor"
100-
- "custatevec"
101-
- "cutensornet"
102-
plugins:
103-
- JuliaCI/julia#v1:
104-
version: "1.12"
105-
- JuliaCI/julia-test#v1:
106-
project: "lib/{{matrix.package}}"
107-
- JuliaCI/julia-coverage#v1:
108-
dirs:
109-
- src
110-
- lib
111-
- examples
112-
agents:
113-
queue: "juliagpu"
114-
cuda: "*"
115-
if: |
116-
build.message =~ /\[only tests\]/ ||
117-
build.message =~ /\[only subpackages\]/ ||
118-
build.message !~ /\[only/ && !build.pull_request.draft &&
119-
build.message !~ /\[skip tests\]/ &&
120-
build.message !~ /\[skip subpackages\]/
121-
timeout_in_minutes: 30
122-
commands: |
123-
unset LD_LIBRARY_PATH
124-
125119
- group: ":telescope: Downstream"
126120
depends_on: "cuda"
127121
steps:
@@ -185,7 +179,7 @@ steps:
185179
- label: "Enzyme.jl"
186180
plugins:
187181
- JuliaCI/julia#v1:
188-
version: "1.10" # XXX: Enzyme.jl is broken on 1.11
182+
version: "1.11"
189183
- JuliaCI/julia-coverage#v1:
190184
dirs:
191185
- src
@@ -250,12 +244,12 @@ steps:
250244
julia --project -e '
251245
using CUDA
252246
@assert !CUDA.functional()
253-
@assert !isdefined(CUDA, :libcudart)
247+
@assert !isdefined(CUDACore, :libcudart)
254248
CUDA.set_runtime_version!(v"11.6")'
255249
julia --project -e '
256250
using CUDA
257251
@assert !CUDA.functional()
258-
@assert isdefined(CUDA, :libcudart)'
252+
@assert isdefined(CUDACore, :libcudart)'
259253
agents:
260254
queue: "juliagpu"
261255
intel: "*"
@@ -270,9 +264,9 @@ steps:
270264
- label: "Compute sanitizer"
271265
plugins:
272266
- JuliaCI/julia#v1:
273-
version: "1.11"
267+
version: "1.12"
274268
- JuliaCI/julia-test#v1:
275-
test_args: "--sanitize core base"
269+
test_args: "--sanitize core"
276270
- JuliaCI/julia-coverage#v1:
277271
dirs:
278272
- src
@@ -294,9 +288,9 @@ steps:
294288
- label: "Legacy memory allocator"
295289
plugins:
296290
- JuliaCI/julia#v1:
297-
version: "1.11"
291+
version: "1.12"
298292
- JuliaCI/julia-test#v1:
299-
test_args: "--quickfail core base"
293+
test_args: "--quickfail core"
300294
- JuliaCI/julia-coverage#v1:
301295
dirs:
302296
- src
@@ -320,9 +314,9 @@ steps:
320314
- label: "CuArray with {{matrix.memory}} memory"
321315
plugins:
322316
- JuliaCI/julia#v1:
323-
version: "1.11"
317+
version: "1.12"
324318
- JuliaCI/julia-test#v1:
325-
test_args: "--quickfail core base libraries"
319+
test_args: "--quickfail core"
326320
- JuliaCI/julia-coverage#v1:
327321
dirs:
328322
- src
@@ -352,9 +346,9 @@ steps:
352346
- label: "MultiGPU"
353347
plugins:
354348
- JuliaCI/julia#v1:
355-
version: "1.11"
349+
version: "1.12"
356350
- JuliaCI/julia-test#v1:
357-
test_args: "--gpu=0,1 --quickfail core base libraries"
351+
test_args: "--gpu=0,1 --quickfail core libraries/cublas/xt"
358352
- JuliaCI/julia-coverage#v1:
359353
dirs:
360354
- src
@@ -380,7 +374,7 @@ steps:
380374
- label: ":books: Documentation"
381375
plugins:
382376
- JuliaCI/julia#v1:
383-
version: "1.11"
377+
version: "1.12"
384378
commands: |
385379
unset LD_LIBRARY_PATH
386380
julia --project -e '

CUDACore/Project.toml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name = "CUDACore"
2+
uuid = "bd0ed864-bdfe-4181-a5ed-ce625a5fdea2"
3+
version = "6.0.0"
4+
5+
[deps]
6+
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
7+
BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b"
8+
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
9+
CUDA_Compiler_jll = "d1e2174e-dfdc-576e-b43e-73b79eb1aca8"
10+
CUDA_Driver_jll = "4ee394cb-3365-5eb0-8335-949819d2adfc"
11+
CUDA_Runtime_Discovery = "1af6417a-86b4-443c-805f-a4643ffb695f"
12+
CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"
13+
Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
14+
ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04"
15+
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
16+
GPUCompiler = "61eb1bfa-7361-4325-ad38-22787b887f55"
17+
GPUToolbox = "096a3bc2-3ced-46d0-87f4-dd12716f4bfc"
18+
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
19+
LLVM = "929cbde3-209d-540e-8aea-75f648917ca0"
20+
LLVMLoopInfo = "8b046642-f1f6-4319-8d3c-209ddc03c586"
21+
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
22+
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
23+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
24+
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
25+
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
26+
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
27+
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
28+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
29+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
30+
Random123 = "74087812-796a-5b5d-8853-05524746bad3"
31+
RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143"
32+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
33+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
34+
demumble_jll = "1e29f10c-031c-5a83-9565-69cddfc27673"
35+
36+
[weakdeps]
37+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
38+
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
39+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
40+
41+
[extensions]
42+
ChainRulesCoreExt = "ChainRulesCore"
43+
EnzymeCoreExt = "EnzymeCore"
44+
SpecialFunctionsExt = "SpecialFunctions"
45+
46+
[compat]
47+
Adapt = "4.4"
48+
BFloat16s = "0.5, 0.6"
49+
CEnum = "0.2, 0.3, 0.4, 0.5"
50+
CUDA_Compiler_jll = "0.3, 0.4"
51+
CUDA_Driver_jll = "13"
52+
CUDA_Runtime_Discovery = "1"
53+
CUDA_Runtime_jll = "0.21"
54+
ChainRulesCore = "1"
55+
Crayons = "4"
56+
EnzymeCore = "0.8.2"
57+
ExprTools = "0.1"
58+
GPUArrays = "11.4.1"
59+
GPUCompiler = "1.4"
60+
GPUToolbox = "1.1"
61+
KernelAbstractions = "0.9.38"
62+
LLVM = "9.3.1"
63+
LLVMLoopInfo = "1"
64+
LazyArtifacts = "1"
65+
Libdl = "1"
66+
LinearAlgebra = "1"
67+
Logging = "1"
68+
NVTX = "1"
69+
Preferences = "1"
70+
PrettyTables = "3"
71+
Printf = "1"
72+
Random = "1"
73+
Random123 = "1.2"
74+
RandomNumbers = "1.5.3"
75+
SpecialFunctions = "1.3, 2"
76+
StaticArrays = "1.9.8"
77+
Statistics = "1"
78+
demumble_jll = "1.3"
79+
julia = "1.10"
80+
81+
[extras]
82+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
83+
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
84+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module ChainRulesCoreExt
44

5-
using CUDA: CuArray
5+
using CUDACore: CuArray
66

77
isdefined(Base, :get_extension) ? (import ChainRulesCore) : (import ..ChainRulesCore)
88

0 commit comments

Comments
 (0)