Skip to content

Commit

Permalink
Merge pull request #41 from timholy/teh/precompiletools
Browse files Browse the repository at this point in the history
Migrate from SnoopPrecompile to PrecompileTools
  • Loading branch information
roflmaostc authored Apr 25, 2023
2 parents c2e1f1e + c78a0b4 commit f32924f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/DeconvOptim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using LinearAlgebra

using FillArrays

using SnoopPrecompile
using PrecompileTools


include("forward_models.jl")
Expand All @@ -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)

Expand Down

0 comments on commit f32924f

Please sign in to comment.