diff --git a/Project.toml b/Project.toml index b0f1327..443c585 100644 --- a/Project.toml +++ b/Project.toml @@ -13,7 +13,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Noise = "81d43f40-5267-43b7-ae1c-8b967f377efa" Optim = "429524aa-4258-5aef-a3af-852621145aeb" Requires = "ae029012-a4dd-5104-9daa-d747884805df" -SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c" +PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" Tullio = "bc48ee85-29a4-5162-ae0b-a64e1601d4bc" @@ -28,7 +28,7 @@ LineSearches = "7.1" Noise = "0.3" Optim = "1.2, 1.3, 1.4, 1.5, 1.6" Requires = "1.1.0" -SnoopPrecompile = "1" +PrecompileTools = "1" StatsBase = "0.33" Tullio = "0.3" Zygote = "0.6" diff --git a/src/DeconvOptim.jl b/src/DeconvOptim.jl index 1db960a..bf23289 100644 --- a/src/DeconvOptim.jl +++ b/src/DeconvOptim.jl @@ -27,7 +27,7 @@ using LinearAlgebra using FillArrays -using SnoopPrecompile +using PrecompileTools include("forward_models.jl") @@ -48,11 +48,11 @@ using Zygote: gradient # doesn't save too much but a little -@precompile_setup begin +@setup_workload begin img = abs.(randn((4,4,2))) psf = abs.(randn((4,4,2))) - @precompile_all_calls begin + @compile_workload begin deconvolution(Float32.(img), Float32.(psf), regularizer=TV(num_dims=3), iterations=2) deconvolution(img, psf, regularizer=TV(num_dims=3), iterations=2)