Skip to content

Commit

Permalink
Merge #2284 #2288
Browse files Browse the repository at this point in the history
2284: Remove explicit use of CUDA in benchmark_step r=charleskawczynski a=charleskawczynski

This PR removes an explicit use of CUDA in `benchmark_step!`, so that we have no direct package loading of CUDA.

2288: Remove OrdinaryDiffEq from environments r=charleskawczynski a=charleskawczynski

This PR removes OrdinaryDiffEq from the environments, a followup to #2183. Now, OrdinaryDiffEq is only a weakdep, which conditionally comes in (if used) through DiffEqCallbacks.

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski authored Oct 25, 2023
3 parents 4aa8e9f + 236f4e1 + 5068bf1 commit 9fcf2d9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 640 deletions.
216 changes: 1 addition & 215 deletions docs/Manifest.toml

Large diffs are not rendered by default.

207 changes: 2 additions & 205 deletions examples/Manifest.toml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NCRegressionTests = "1789bc09-29e6-4c93-9c75-fe2179693664"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PoissonRandom = "e409e4f3-bfea-5376-8464-e040bb5c01ab"
Expand Down
207 changes: 2 additions & 205 deletions perf/Manifest.toml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion perf/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
PProf = "e4faabce-9ead-11e9-39d9-4379958e3056"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Expand Down
15 changes: 3 additions & 12 deletions perf/benchmark_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ include(joinpath("perf", "benchmark_step.jl"));
import Random
Random.seed!(1234)
import ClimaAtmos as CA
using CUDA
import ClimaComms

config = CA.AtmosConfig()
Expand All @@ -28,17 +27,9 @@ CA.benchmark_step!(integrator, Y₀); # compile first
n_steps = 10
comms_ctx = ClimaComms.context(integrator.u.c)
device = ClimaComms.device(comms_ctx)
if device isa ClimaComms.CUDADevice
e = CUDA.@elapsed begin
s = CA.@timed_str begin
CA.benchmark_step!(integrator, Y₀, n_steps) # run
end
end
else
e = @elapsed begin
s = CA.@timed_str begin
CA.benchmark_step!(integrator, Y₀, n_steps) # run
end
e = ClimaComms.@elapsed device begin
s = CA.@timed_str begin
CA.benchmark_step!(integrator, Y₀, n_steps) # run
end
end
@info "Ran step! $n_steps times in $s, ($(CA.prettytime(e/n_steps*1e9)) per step)"
1 change: 0 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NCRegressionTests = "1789bc09-29e6-4c93-9c75-fe2179693664"
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PoissonRandom = "e409e4f3-bfea-5376-8464-e040bb5c01ab"
Expand Down

0 comments on commit 9fcf2d9

Please sign in to comment.