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

Solve some deprecation warnings #286

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Solve some deprecation warnings #286

merged 1 commit into from
Nov 15, 2024

Conversation

giordano
Copy link
Member

┌ Warning: mpiexec() is deprecated, use the non-do-block form
│   caller = ip:0x0
└ @ Core :-1
┌ Warning: `PDiagMat(dim::Int, diag::AbstractVector{<:Real})` is deprecated, use `PDiagMat(diag)` instead.
│   caller = ip:0x0
└ @ Core :-1

```
┌ Warning: mpiexec() is deprecated, use the non-do-block form
│   caller = ip:0x0
└ @ Core :-1
┌ Warning: `PDiagMat(dim::Int, diag::AbstractVector{<:Real})` is deprecated, use `PDiagMat(diag)` instead.
│   caller = ip:0x0
└ @ Core :-1
```
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.46%. Comparing base (46678bf) to head (9c90676).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
- Coverage   92.48%   92.46%   -0.02%     
==========================================
  Files           7        7              
  Lines         386      385       -1     
==========================================
- Hits          357      356       -1     
  Misses         29       29              

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

@giordano
Copy link
Member Author

It appears deprecation warnings massively slow down runtime on Julia v1.12 (Julia Version 1.12.0-DEV.1638 Commit 55bdb54dd2e (2024-11-15 11:14 UTC)), compare TimerOutputs during tests on master (e74ca8c):

────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            24.3s / 100.0%           60.3MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    21.6s   89.1%   216ms   35.8MiB   59.3%   367KiB
Gather weights           100    1.77s    7.3%  17.7ms     0.00B    0.0%    0.00B
Summary statistics         1    573ms    2.4%   573ms   20.0MiB   33.1%  20.0MiB
Unpack statistics          1    151ms    0.6%   151ms   2.72MiB    4.5%  2.72MiB
Filter initialization      1   98.7ms    0.4%  98.7ms    709KiB    1.1%   709KiB
Copy states              100   53.4ms    0.2%   534μs   63.3KiB    0.1%     648B
Model initialization       1   3.82ms    0.0%  3.82ms   0.99MiB    1.6%  0.99MiB
State initialization       1    707μs    0.0%   707μs   53.5KiB    0.1%  53.5KiB
Update statistics          1    366μs    0.0%   366μs      992B    0.0%     992B
Normalize weights        100    183μs    0.0%  1.83μs     0.00B    0.0%    0.00B
Resample                 100    180μs    0.0%  1.80μs   17.2KiB    0.0%     176B
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            27.3s / 100.0%            174MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    23.6s   86.5%   236ms    122MiB   70.3%  1.22MiB
Gather weights           100    2.50s    9.2%  25.0ms   9.45KiB    0.0%    96.8B
Filter initialization      1    731ms    2.7%   731ms   50.4MiB   29.1%  50.4MiB
Summary statistics         1    416ms    1.5%   416ms      816B    0.0%     816B
Copy states              100   24.0ms    0.1%   240μs   65.0KiB    0.0%     666B
Model initialization       1   2.10ms    0.0%  2.10ms   0.99MiB    0.6%  0.99MiB
State initialization       1    706μs    0.0%   706μs   53.5KiB    0.0%  53.5KiB
Normalize weights        100    298μs    0.0%  2.98μs     0.00B    0.0%    0.00B
Resample                 100    266μs    0.0%  2.66μs   17.2KiB    0.0%     176B
Update statistics          1    184μs    0.0%   184μs      816B    0.0%     816B
Unpack statistics          1   25.3μs    0.0%  25.3μs      832B    0.0%     832B
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            24.5s / 100.0%           50.6MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    22.4s   91.4%   224ms   45.6MiB   90.1%   467KiB
Gather weights           100    1.90s    7.8%  19.0ms   4.69KiB    0.0%    48.0B
Summary statistics         1    151ms    0.6%   151ms      992B    0.0%     992B
Filter initialization      1   33.6ms    0.1%  33.6ms   3.69MiB    7.3%  3.69MiB
Copy states              100   12.1ms    0.0%   121μs   65.0KiB    0.1%     666B
Model initialization       1   2.10ms    0.0%  2.10ms   0.99MiB    2.0%  0.99MiB
State initialization       1    690μs    0.0%   690μs   53.5KiB    0.1%  53.5KiB
Update statistics          1    348μs    0.0%   348μs      992B    0.0%     992B
Normalize weights        100    314μs    0.0%  3.14μs     0.00B    0.0%    0.00B
Resample                 100    270μs    0.0%  2.70μs   17.2KiB    0.0%     176B
Unpack statistics          1    213μs    0.0%   213μs    208KiB    0.4%   208KiB
────────────────────────────────────────────────────────────────────────────────

vs tests on this PR

────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            3.13s / 100.0%           55.0MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    1.74s   55.6%  17.4ms   30.4MiB   55.3%   311KiB
Summary statistics         1    690ms   22.0%   690ms   20.0MiB   36.4%  20.0MiB
Gather weights           100    475ms   15.1%  4.75ms     0.00B    0.0%    0.00B
Unpack statistics          1   97.3ms    3.1%  97.3ms   2.75MiB    5.0%  2.75MiB
Filter initialization      1   89.6ms    2.9%  89.6ms    709KiB    1.3%   709KiB
Copy states              100   35.0ms    1.1%   350μs   63.3KiB    0.1%     648B
Model initialization       1   3.36ms    0.1%  3.36ms   0.99MiB    1.8%  0.99MiB
State initialization       1    709μs    0.0%   709μs   53.5KiB    0.1%  53.5KiB
Update statistics          1    367μs    0.0%   367μs      992B    0.0%     992B
Resample                 100   82.7μs    0.0%   827ns   17.2KiB    0.0%     176B
Normalize weights        100   80.9μs    0.0%   809ns     0.00B    0.0%    0.00B
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            5.10s /  99.8%            168MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    2.91s   57.2%  29.1ms    117MiB   69.4%  1.17MiB
Gather weights           100    1.39s   27.4%  13.9ms   9.45KiB    0.0%    96.8B
Filter initialization      1    578ms   11.4%   578ms   50.4MiB   29.9%  50.4MiB
Summary statistics         1    172ms    3.4%   172ms      816B    0.0%     816B
Copy states              100   29.0ms    0.6%   290μs   65.0KiB    0.0%     666B
Model initialization       1   3.34ms    0.1%  3.34ms   0.99MiB    0.6%  0.99MiB
State initialization       1    734μs    0.0%   734μs   53.5KiB    0.0%  53.5KiB
Normalize weights        100    117μs    0.0%  1.17μs     0.00B    0.0%    0.00B
Resample                 100    111μs    0.0%  1.11μs   17.2KiB    0.0%     176B
Update statistics          1   93.6μs    0.0%  93.6μs      816B    0.0%     816B
Unpack statistics          1   18.1μs    0.0%  18.1μs      832B    0.0%     832B
────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────
                                       Time                    Allocations      
                              ───────────────────────   ────────────────────────
      Tot / % measured:            3.30s / 100.0%           45.3MiB / 100.0%    

Section               ncalls     time    %tot     avg     alloc    %tot      avg
────────────────────────────────────────────────────────────────────────────────
Proposals and weights    100    2.31s   70.1%  23.1ms   40.2MiB   88.9%   412KiB
Gather weights           100    590ms   17.9%  5.90ms   4.69KiB    0.0%    48.0B
Summary statistics         1    346ms   10.5%   346ms      992B    0.0%     992B
Filter initialization      1   33.1ms    1.0%  33.1ms   3.69MiB    8.2%  3.69MiB
Copy states              100   12.4ms    0.4%   124μs   65.0KiB    0.1%     666B
Model initialization       1   2.07ms    0.1%  2.07ms   0.99MiB    2.2%  0.99MiB
State initialization       1    688μs    0.0%   688μs   53.5KiB    0.1%  53.5KiB
Update statistics          1    280μs    0.0%   280μs      992B    0.0%     992B
Unpack statistics          1    210μs    0.0%   210μs    208KiB    0.4%   208KiB
Normalize weights        100    116μs    0.0%  1.16μs     0.00B    0.0%    0.00B
Resample                 100    102μs    0.0%  1.02μs   17.2KiB    0.0%     176B
────────────────────────────────────────────────────────────────────────────────

There's a slight improvement also for v1.11, but that's of the order of ~10%, not ~10x

@giordano giordano merged commit 80ec403 into main Nov 15, 2024
9 of 10 checks passed
@giordano giordano deleted the mg/pdiagmat branch November 15, 2024 14:39
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.

1 participant