Skip to content

Commit

Permalink
Ignore more packages in JET tests, lower inf failure limit
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jan 29, 2024
1 parent fb7b560 commit e5def39
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions perf/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "f4c48efdb4bd69597601a8d0d01e26ff9df53b02"
project_hash = "3c2a77c695622e90d7845846b4e4c54862493742"

[[deps.ADTypes]]
git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245"
Expand Down Expand Up @@ -311,7 +311,7 @@ version = "0.5.6"

[[deps.ClimaCore]]
deps = ["Adapt", "BandedMatrices", "BlockArrays", "CUDA", "ClimaComms", "CubedSphere", "DataStructures", "DocStringExtensions", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LinearAlgebra", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "Static", "StaticArrays", "Statistics", "Unrolled"]
git-tree-sha1 = "e43923b57aa6abea8df2b59e1318f5598e715bf0"
git-tree-sha1 = "541bf25a8adc3c7ddf8d45a96149964f5cfbb074"
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
version = "0.11.9"
weakdeps = ["Krylov"]
Expand Down
1 change: 1 addition & 0 deletions perf/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ AtmosphericProfilesLibrary = "86bc3604-9858-485a-bdbe-831ec50de11d"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ClimaAnalysis = "29b5916a-a76c-4e73-9657-3c8fd22e65e6"
ClimaAtmos = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
Expand Down
5 changes: 4 additions & 1 deletion perf/jet.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
redirect_stderr(IOContext(stderr, :stacktrace_types_limited => Ref(false)))
import Random
import HDF5, NCDatasets, CUDA
Random.seed!(1234)
import ClimaAtmos as CA

Expand All @@ -15,4 +16,6 @@ import JET

import SciMLBase
SciMLBase.step!(integrator) # Make sure no errors
JET.@test_opt SciMLBase.step!(integrator)
JET.@test_opt ignored_modules = (HDF5, CUDA, NCDatasets) SciMLBase.step!(
integrator,
)
7 changes: 5 additions & 2 deletions perf/jet_report_nfailures.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# This script assumes that `integrator` is defined.
import JET
import HDF5
import HDF5, NCDatasets, CUDA
# Suggested in: https://github.com/aviatesk/JET.jl/issues/455
macro n_failures(ex)
return :(
let result = JET.@report_opt ignored_modules = (HDF5,) $(ex)
let result =
JET.@report_opt ignored_modules = (HDF5, CUDA, NCDatasets) $(
ex
)
length(JET.get_reports(result.analyzer, result.result))
end
)
Expand Down
9 changes: 6 additions & 3 deletions perf/jet_test_nfailures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ import JET
import SciMLBase
SciMLBase.step!(integrator) # Make sure no errors

import HDF5
import HDF5, NCDatasets, CUDA
# Suggested in: https://github.com/aviatesk/JET.jl/issues/455
macro n_failures(ex)
return :(
let result = JET.@report_opt ignored_modules = (HDF5,) $(ex)
let result =
JET.@report_opt ignored_modules = (HDF5, NCDatasets, CUDA) $(
ex
)
length(JET.get_reports(result.analyzer, result.result))
end
)
Expand All @@ -35,7 +38,7 @@ using Test
# inference. By increasing this counter, we acknowledge that
# we have introduced an inference failure. We hope to drive
# this number down to 0.
n_allowed_failures = 94
n_allowed_failures = 42
@show n
@test n n_allowed_failures
if n < n_allowed_failures
Expand Down

0 comments on commit e5def39

Please sign in to comment.