From e5def39633e09f82f7dcea42ced948294851b077 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Mon, 29 Jan 2024 16:49:40 -0500 Subject: [PATCH] Ignore more packages in JET tests, lower inf failure limit --- perf/Manifest.toml | 4 ++-- perf/Project.toml | 1 + perf/jet.jl | 5 ++++- perf/jet_report_nfailures.jl | 7 +++++-- perf/jet_test_nfailures.jl | 9 ++++++--- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/perf/Manifest.toml b/perf/Manifest.toml index 93da6c1ab88..569ff6e7ced 100644 --- a/perf/Manifest.toml +++ b/perf/Manifest.toml @@ -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" @@ -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"] diff --git a/perf/Project.toml b/perf/Project.toml index 590062a0765..5e96b6c2995 100644 --- a/perf/Project.toml +++ b/perf/Project.toml @@ -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" diff --git a/perf/jet.jl b/perf/jet.jl index 618547a586b..85fd9fe3f91 100644 --- a/perf/jet.jl +++ b/perf/jet.jl @@ -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 @@ -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, +) diff --git a/perf/jet_report_nfailures.jl b/perf/jet_report_nfailures.jl index 3399999f86e..07ec544be33 100644 --- a/perf/jet_report_nfailures.jl +++ b/perf/jet_report_nfailures.jl @@ -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 ) diff --git a/perf/jet_test_nfailures.jl b/perf/jet_test_nfailures.jl index 50c7649d210..3b2f7398447 100644 --- a/perf/jet_test_nfailures.jl +++ b/perf/jet_test_nfailures.jl @@ -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 ) @@ -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