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

Minor updates to kalman performance #41

Closed
2 tasks done
jlperla opened this issue Feb 14, 2022 · 2 comments
Closed
2 tasks done

Minor updates to kalman performance #41

jlperla opened this issue Feb 14, 2022 · 2 comments
Assignees

Comments

@jlperla
Copy link
Collaborator

jlperla commented Feb 14, 2022

  • Fix up benchmarking to get rid of DistributionsAD
  • Look for low-hanging fruit of inplace, reusing factorizations, etc.
@jlperla jlperla self-assigned this Feb 14, 2022
@jlperla
Copy link
Collaborator Author

jlperla commented Feb 14, 2022

The results of he PkgBenchmark judge on the zygote vs. custom gradient prior to optimizing it:

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

| ID                                          | time ratio                   | memory ratio                 |
|---------------------------------------------|------------------------------|------------------------------|
| `["linear", "FVGQ", "kalman_gradient"]`     | 0.32 (5%) :white_check_mark: | 0.62 (1%) :white_check_mark: |
| `["linear", "rbc", "kalman_gradient"]`      | 0.15 (5%) :white_check_mark: | 0.29 (1%) :white_check_mark: |

jlperla added a commit that referenced this issue Feb 14, 2022
…val (#42)

Part of #41 

* Unit tests working without CSV

* Benchmarks running again
@jlperla
Copy link
Collaborator Author

jlperla commented Feb 16, 2022

Comparison to old pre-optimized code is now:

Results RELATIVE TO PRE-CUSTOM CODE

ID time ratio memory ratio
["linear", "FVGQ", "kalman"] 0.18 (5%) ✅ 0.49 (1%) ✅
["linear", "FVGQ", "kalman_gradient"] 0.13 (5%) ✅ 0.07 (1%) ✅
["linear", "rbc", "kalman"] 0.10 (5%) ✅ 0.64 (1%) ✅
["linear", "rbc", "kalman_gradient"] 0.02 (5%) ✅ 0.05 (1%) ✅

Results RELATIVE TO CODE BEFORE ALLOCATIONS

ID time ratio memory ratio
["linear", "FVGQ", "kalman"] 1.07 (5%) ❌ 1.38 (1%) ❌
["linear", "FVGQ", "kalman_gradient"] 0.41 (5%) ✅ 0.12 (1%) ✅
["linear", "rbc", "kalman"] 1.06 (5%) ❌ 1.16 (1%) ❌
["linear", "rbc", "kalman_gradient"] 0.12 (5%) ✅ 0.17 (1%) ✅
  • Note that this is before moving any of the data into a reusable cache between samplers, which should speed things up considerably.

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

No branches or pull requests

1 participant