Skip to content

Commit ca24ff9

Browse files
Merge pull request #1687 from CliMA/ck/cuda_ext
Make CUDA an extension
2 parents 3faa8da + 1f4c5cd commit ca24ff9

Some content is hidden

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

44 files changed

+2378
-2134
lines changed

.buildkite/pipeline.yml

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ steps:
2020
rm -rf ${JULIA_DEPOT_PATH}
2121
fi
2222
23-
- echo "--- Instantiate project"
24-
- "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
25-
# force the initialization of the CUDA runtime as it is lazily loaded by default
26-
- "julia --project -e 'using CUDA; CUDA.precompile_runtime()'"
27-
2823
- echo "--- Instantiate test"
29-
- "julia --project=test -e 'using Pkg; Pkg.develop(path=\".\"); Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
30-
- "julia --project=test --check-bounds=yes -e 'using Pkg; Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
24+
- "julia --project=test --check-bounds=yes -e 'using Pkg; Pkg.develop(path=\".\"); Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
25+
- "julia --project=test -e 'using CUDA; CUDA.precompile_runtime()'"
3126

3227
- echo "--- Instantiate lib/ClimaCoreTempestRemap"
3328
- "julia --project=lib/ClimaCoreTempestRemap -e 'using Pkg; Pkg.develop(path=\".\"); Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
@@ -43,7 +38,7 @@ steps:
4338
- "julia --project=benchmarks/bickleyjet -e 'using Pkg; Pkg.instantiate(;verbose=true); Pkg.precompile(;strict=true)'"
4439

4540
- echo "--- Instantiate status"
46-
- "julia --project -e 'using Pkg; Pkg.status()'"
41+
- "julia --project=test -e 'using Pkg; Pkg.status()'"
4742

4843
agents:
4944
slurm_mem: 80G
@@ -109,7 +104,7 @@ steps:
109104
- label: "Unit: data cuda"
110105
key: unit_data_cuda
111106
command:
112-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
107+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
113108
- "julia --color=yes --check-bounds=yes --project=test test/DataLayouts/cuda.jl CUDA"
114109
agents:
115110
slurm_gpus: 1
@@ -181,15 +176,15 @@ steps:
181176
- label: "Unit: cuda spaces"
182177
key: "gpu_cuda_spaces"
183178
command:
184-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
179+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
185180
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/spaces.jl"
186181
agents:
187182
slurm_gpus: 1
188183

189184
- label: "Unit: distributed cuda spaces"
190185
key: "gpu_distributed_extruded_cuda_spaces"
191186
command:
192-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
187+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
193188
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/space_construction.jl CUDA"
194189
agents:
195190
slurm_gpus_per_task: 1
@@ -198,15 +193,15 @@ steps:
198193
- label: "Unit: ddss1"
199194
key: unit_ddss1
200195
command:
201-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
196+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
202197
- "julia --color=yes --check-bounds=yes --project=test test/Spaces/ddss1.jl CUDA"
203198
agents:
204199
slurm_gpus: 1
205200

206201
- label: "Unit: ddss1 cs"
207202
key: unit_ddss1_cs
208203
command:
209-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
204+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
210205
- "julia --color=yes --check-bounds=yes --project=test test/Spaces/ddss1_cs.jl CUDA"
211206
agents:
212207
slurm_gpus: 1
@@ -303,7 +298,7 @@ steps:
303298
- label: "Unit: cuda dss 2-process test"
304299
key: "gpu_ddss2_test"
305300
command:
306-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
301+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
307302
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss2.jl"
308303
timeout_in_minutes: 15
309304
env:
@@ -315,7 +310,7 @@ steps:
315310
- label: "Unit: cuda dss 3-process test"
316311
key: "gpu_ddss3_test"
317312
command:
318-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
313+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
319314
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss3.jl"
320315
timeout_in_minutes: 15
321316
env:
@@ -327,7 +322,7 @@ steps:
327322
- label: "Unit: cuda dss 4-process test"
328323
key: "gpu_ddss4_test"
329324
command:
330-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
325+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
331326
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss4.jl"
332327
timeout_in_minutes: 15
333328
env:
@@ -339,7 +334,7 @@ steps:
339334
- label: "Unit: cuda Cubed Sphere dss; ne = 32; 2-process test"
340335
key: "gpu_ddss_ne32_cs_2processes"
341336
command:
342-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
337+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
343338
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss_ne32_cs.jl"
344339
timeout_in_minutes: 15
345340
env:
@@ -351,7 +346,7 @@ steps:
351346
- label: "Unit: cuda Cubed Sphere dss; ne = 32; 3-process test"
352347
key: "gpu_ddss_ne32_cs_3processes"
353348
command:
354-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
349+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
355350
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss_ne32_cs.jl"
356351
timeout_in_minutes: 15
357352
env:
@@ -363,7 +358,7 @@ steps:
363358
- label: "Unit: cuda Cubed Sphere dss; ne = 32; 4-process test"
364359
key: "gpu_ddss_ne32_cs_4processes"
365360
command:
366-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
361+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
367362
- "srun julia --color=yes --check-bounds=yes --project=test test/Spaces/distributed_cuda/ddss_ne32_cs.jl"
368363
timeout_in_minutes: 15
369364
env:
@@ -382,23 +377,23 @@ steps:
382377
- label: "Unit: field cuda"
383378
key: unit_field_cuda
384379
command:
385-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
380+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
386381
- "julia --color=yes --check-bounds=yes --project=test test/Fields/field.jl"
387382
agents:
388383
slurm_gpus: 1
389384

390385
- label: "Unit: reduction cuda"
391386
key: unit_reduction_cuda
392387
command:
393-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
388+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
394389
- "julia --color=yes --check-bounds=yes --project=test test/Fields/reduction_cuda.jl CUDA"
395390
agents:
396391
slurm_gpus: 1
397392

398393
- label: "Unit: distributed reduction cuda"
399394
key: unit_distributed_reduction_cuda
400395
command:
401-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
396+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
402397
- "srun julia --color=yes --check-bounds=yes --project=test test/Fields/reduction_cuda_distributed.jl"
403398
agents:
404399
slurm_gpus_per_task: 1
@@ -516,31 +511,31 @@ steps:
516511
key: unit_rectilinear_cuda
517512
command: "julia --color=yes --check-bounds=yes --project=test test/Operators/spectralelement/rectilinear_cuda.jl"
518513
command:
519-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
514+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
520515
- "julia --color=yes --check-bounds=yes --project=test test/Operators/spectralelement/rectilinear_cuda.jl CUDA"
521516
agents:
522517
slurm_gpus: 1
523518

524519
- label: "Unit: hybrid operators cuda"
525520
key: unit_ops_cuda
526521
command:
527-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
522+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
528523
- "julia --color=yes --check-bounds=yes --project=test test/Operators/hybrid/cuda.jl CUDA"
529524
agents:
530525
slurm_gpus: 1
531526

532527
- label: "Unit: extruded sphere cuda"
533528
key: unit_extruded_sphere_cuda
534529
command:
535-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
530+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
536531
- "julia --color=yes --check-bounds=yes --project=test test/Operators/hybrid/extruded_sphere_cuda.jl CUDA"
537532
agents:
538533
slurm_gpus: 1
539534

540535
- label: "Unit: extruded 3dbox cuda"
541536
key: unit_extruded_3dbox_cuda
542537
command:
543-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
538+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
544539
- "julia --color=yes --check-bounds=yes --project=test test/Operators/hybrid/extruded_3dbox_cuda.jl CUDA"
545540
agents:
546541
slurm_gpus: 1
@@ -947,7 +942,7 @@ steps:
947942
- label: "Unit: limiter cuda"
948943
key: unit_limiter_gpu
949944
command:
950-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
945+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
951946
- "julia --color=yes --project=test test/Limiters/limiter.jl"
952947
agents:
953948
slurm_gpus: 1
@@ -995,7 +990,7 @@ steps:
995990
- label: "Perf: FD operators from the wild (gpu)"
996991
key: perf_FD_ops_examples_gpu
997992
command:
998-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
993+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
999994
- "julia --color=yes --project=test test/Operators/finitedifference/opt_examples.jl"
1000995
agents:
1001996
slurm_gpus: 1
@@ -1020,7 +1015,7 @@ steps:
10201015
- label: "Perf: SEM operator benchmarks (cuda Float32)"
10211016
key: "perf_gpu_spectral_ops_cuda_float32"
10221017
command:
1023-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
1018+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
10241019
- "julia --color=yes --project=test test/Operators/spectralelement/benchmark_ops.jl --device CUDA --float-type Float32"
10251020
agents:
10261021
slurm_gpus: 1
@@ -1032,7 +1027,7 @@ steps:
10321027
- label: "Perf: SEM operator benchmarks (cuda Float64)"
10331028
key: "perf_gpu_spectral_ops_cuda_float64"
10341029
command:
1035-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
1030+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
10361031
- "julia --color=yes --project=test test/Operators/spectralelement/benchmark_ops.jl --device CUDA --float-type Float64"
10371032
agents:
10381033
slurm_gpus: 1
@@ -1048,7 +1043,7 @@ steps:
10481043
- label: "Perf: SEM operator benchmarks"
10491044
key: "perf_gpu_spectral_ops"
10501045
command:
1051-
- "julia --project -e 'using CUDA; CUDA.versioninfo()'"
1046+
- "julia --project=test -e 'using CUDA; CUDA.versioninfo()'"
10521047
- "julia --color=yes --project=test test/Operators/spectralelement/benchmark_ops.jl --device CUDA"
10531048
agents:
10541049
slurm_gpus: 1

.dev/Manifest.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
1616

1717
[[deps.CSTParser]]
1818
deps = ["Tokenize"]
19-
git-tree-sha1 = "b544d62417a99d091c569b95109bc9d8c223e9e3"
19+
git-tree-sha1 = "0157e592151e39fa570645e2b2debcdfb8a0f112"
2020
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
21-
version = "3.4.2"
21+
version = "3.4.3"
2222

2323
[[deps.CommonMark]]
2424
deps = ["Crayons", "JSON", "PrecompileTools", "URIs"]
@@ -46,9 +46,9 @@ version = "4.1.1"
4646

4747
[[deps.DataStructures]]
4848
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
49-
git-tree-sha1 = "97d79461925cdb635ee32116978fc735b9463a39"
49+
git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82"
5050
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
51-
version = "0.18.19"
51+
version = "0.18.20"
5252

5353
[[deps.Dates]]
5454
deps = ["Printf"]
@@ -194,9 +194,9 @@ uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
194194
version = "1.10.0"
195195

196196
[[deps.Tokenize]]
197-
git-tree-sha1 = "5b5a892ba7704c0977013bd0f9c30f5d962181e0"
197+
git-tree-sha1 = "468b4685af4abe0e9fd4d7bf495a6554a6276e75"
198198
uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
199-
version = "0.5.28"
199+
version = "0.5.29"
200200

201201
[[deps.URIs]]
202202
git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b"

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ version = "0.13.4"
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
88
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
99
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
10-
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
1110
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
1211
CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
1312
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
@@ -32,9 +31,11 @@ Unrolled = "9602ed7d-8fef-5bc8-8597-8f21381861e8"
3231

3332
[weakdeps]
3433
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
34+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
3535

3636
[extensions]
3737
KrylovExt = "Krylov"
38+
ClimaCoreCUDAExt = "CUDA"
3839

3940
[compat]
4041
Adapt = "3, 4"

0 commit comments

Comments
 (0)