Closed SteveBronder closed 1 week ago
Name | Old Result | New Result | Ratio | Performance change( 1 - new / old ) |
---|---|---|---|---|
arma/arma.stan | 0.37 | 0.36 | 1.02 | 2.42% faster |
low_dim_corr_gauss/low_dim_corr_gauss.stan | 0.01 | 0.01 | 0.97 | -3.05% slower |
gp_regr/gen_gp_data.stan | 0.02 | 0.02 | 1.0 | 0.15% faster |
gp_regr/gp_regr.stan | 0.11 | 0.1 | 1.08 | 7.29% faster |
sir/sir.stan | 76.98 | 72.98 | 1.05 | 5.2% faster |
irt_2pl/irt_2pl.stan | 4.88 | 4.5 | 1.08 | 7.7% faster |
eight_schools/eight_schools.stan | 0.07 | 0.06 | 1.16 | 13.73% faster |
pkpd/sim_one_comp_mm_elim_abs.stan | 0.28 | 0.28 | 1.02 | 2.05% faster |
pkpd/one_comp_mm_elim_abs.stan | 20.92 | 19.93 | 1.05 | 4.73% faster |
garch/garch.stan | 0.51 | 0.46 | 1.11 | 9.74% faster |
low_dim_gauss_mix/low_dim_gauss_mix.stan | 2.91 | 2.83 | 1.03 | 3.06% faster |
arK/arK.stan | 1.95 | 2.05 | 0.95 | -5.34% slower |
gp_pois_regr/gp_pois_regr.stan | 3.08 | 2.96 | 1.04 | 3.94% faster |
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan | 9.43 | 9.17 | 1.03 | 2.79% faster |
performance.compilation | 199.73 | 197.18 | 1.01 | 1.28% faster |
Mean result: 1.0409876568862708
Jenkins Console Log Blue Ocean Commit hash: 8faf1b348dbabeb7810ec008d194722ee9cb2c26
Summary
For a PR I'm doing in the Stan repo I need a constructor for
vari_value<Matrix>
types that accepts both the initial value and adjoint.This also changes the other constructors so that by default
vari_value<Matrix>
types are not put on the chainable stack. The var matrix type only needs it's chain called in thecallback_vari
type, but for all other purposes the matrix should actually not have it's chain method called. Instead it is normally called through a seperate emptyvari
made duringreverse_pass_callback()
Tests
Tests added that checks new constructor works and has the same pointer in the case the value and adjoint is the same matrix.
Release notes
Adds constructor to vari for passing initial values and adjoints
Checklist
[x] Copyright holder: Simons Foundation
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
[x] the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)[x] the code is written in idiomatic C++ and changes are documented in the doxygen
[x] the new changes are tested