Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 13, 2024
1 parent 966cc7b commit 08e34f2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions demo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ImageFiltering, FFTW, LinearAlgebra, Profile
using ImageFiltering, FFTW, LinearAlgebra, Profile, Random
# using ProfileView
using ComputationalResources

Expand Down Expand Up @@ -34,20 +34,23 @@ function benchmark(mats)
end

function profile()
Random.seed!(1)
nmats = 10
mats = [rand(Float32, rand(80:100), rand(80:100), rand(2000:3000)) for _ in 1:nmats]
GC.gc(true)

benchmark(mats)

@time "warm run of benchmark(mats)" benchmark(mats)
for _ in 1:3
@time "warm run of benchmark(mats)" benchmark(mats)
end

Profile.clear()
@profile benchmark(mats)
# Profile.clear()
# @profile benchmark(mats)

Profile.print(IOContext(stdout, :displaysize => (24, 200)); C=true, combine=true, mincount=100)
# ProfileView.view()
GC.gc(true)
# Profile.print(IOContext(stdout, :displaysize => (24, 200)); C=true, combine=true, mincount=100)
# # ProfileView.view()
# GC.gc(true)
end

profile()

0 comments on commit 08e34f2

Please sign in to comment.