Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark suite #8

Merged
merged 14 commits into from
Nov 24, 2023
Merged

Add benchmark suite #8

merged 14 commits into from
Nov 24, 2023

Conversation

bartvanerp
Copy link
Member

Added benchmark suite to the package

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6563834) 91.42% compared to head (df7b7d5) 91.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   91.42%   91.42%           
=======================================
  Files           2        2           
  Lines          70       70           
=======================================
  Hits           64       64           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Makefile Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
using PkgBenchmark, FastCholesky, Dates; \
results = benchmarkpkg("FastCholesky"; script="benchmarks/speed/benchmarks.jl"); \
export_markdown("benchmarks/speed/exports/benchmark-"*Dates.format(Dates.now(), "yyyy-mm-ddTHH-MM")*".md", results); \
Base.Filesystem.rm("benchmark"; force=true, recursive=true)'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line gave me a bit of bf

  • I didn't notice that there is no s at the end of the folder, I though this line would just remove the entire benchmark
  • It is not really used after all? There is no folder called benchmark and the output is also in the different place
Suggested change
Base.Filesystem.rm("benchmark"; force=true, recursive=true)'

"`fastcholesky!` is not defined for `UniformScaling`. The shape is not determined."
)
end
fastcholesky(x::UniformScaling) = sqrt(x.λ) * I
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this operation should throw, because this behaviour is not compatible with the output of the other types. fastcholesky must return a Cholesky factorization in the form of the Cholesky structure, but here it simply returns a squared-root of the matrix. For this operation we have a different method called cholsqrt.

Copy link
Member

@bvdmitri bvdmitri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start @bartvanerp!

I noticed some unused lines of code in the Makefile (I guess copied from RxInfer, they are not needed here as the codebase is much simpler). Also read other comments of mine.

I'm also not sure about the change for the fastcholesky! for the UniformScaling, we can discuss.

@bvdmitri
Copy link
Member

I played around with the benchmark, @bartvanerp please check if you agree with the changes.
I'm still a bit hesitant to add the fastcholesky(::UniformScaling) method because it is not really doing any Cholesky factorization, but instead copies the already implemented cholsqrt. wdyt @bartvanerp

Copy link
Member

@bvdmitri bvdmitri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bartvanerp !

@bartvanerp bartvanerp merged commit afa9996 into main Nov 24, 2023
4 checks passed
@bartvanerp bartvanerp deleted the dev-benchmarks branch November 24, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants