Closed andrjohns closed 1 month ago
@andrjohns we also have a jenkins M1 runner available we're not using yet (https://github.com/stan-dev/ci-scripts/issues/35) if that would help
Summary of failures:
The majority appear to be due to minor floating-point differences, so will try with -ffp-contract=off
Remaining failures after adding -ffp-contract=off
:
Name | Old Result | New Result | Ratio | Performance change( 1 - new / old ) |
---|---|---|---|---|
arma/arma.stan | 0.25 | 0.18 | 1.37 | 27.05% faster |
low_dim_corr_gauss/low_dim_corr_gauss.stan | 0.01 | 0.01 | 1.06 | 5.45% faster |
gp_regr/gen_gp_data.stan | 0.02 | 0.02 | 1.07 | 6.35% faster |
gp_regr/gp_regr.stan | 0.11 | 0.11 | 1.01 | 1.42% faster |
sir/sir.stan | 76.54 | 75.55 | 1.01 | 1.3% faster |
irt_2pl/irt_2pl.stan | 3.95 | 3.8 | 1.04 | 3.74% faster |
eight_schools/eight_schools.stan | 0.05 | 0.05 | 1.06 | 5.63% faster |
pkpd/sim_one_comp_mm_elim_abs.stan | 0.25 | 0.24 | 1.04 | 4.1% faster |
pkpd/one_comp_mm_elim_abs.stan | 17.87 | 17.57 | 1.02 | 1.67% faster |
garch/garch.stan | 0.45 | 0.44 | 1.02 | 2.16% faster |
low_dim_gauss_mix/low_dim_gauss_mix.stan | 2.75 | 2.72 | 1.01 | 1.05% faster |
arK/arK.stan | 1.61 | 1.6 | 1.0 | 0.41% faster |
gp_pois_regr/gp_pois_regr.stan | 2.56 | 2.47 | 1.04 | 3.59% faster |
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan | 9.11 | 8.89 | 1.02 | 2.38% faster |
performance.compilation | 172.43 | 176.88 | 0.97 | -2.58% slower |
Mean result: 1.0503491486344982
Jenkins Console Log Blue Ocean Commit hash: b62657db8079bb06c39c70bb82d88755522d5b74
All fixes are in, updated title and description, ready for review
Name | Old Result | New Result | Ratio | Performance change( 1 - new / old ) |
---|---|---|---|---|
arma/arma.stan | 0.19 | 0.19 | 1.0 | -0.44% slower |
low_dim_corr_gauss/low_dim_corr_gauss.stan | 0.01 | 0.01 | 1.01 | 1.15% faster |
gp_regr/gen_gp_data.stan | 0.02 | 0.02 | 1.02 | 2.41% faster |
gp_regr/gp_regr.stan | 0.11 | 0.11 | 1.0 | 0.19% faster |
sir/sir.stan | 78.92 | 77.47 | 1.02 | 1.83% faster |
irt_2pl/irt_2pl.stan | 4.04 | 4.12 | 0.98 | -2.04% slower |
eight_schools/eight_schools.stan | 0.06 | 0.05 | 1.05 | 4.38% faster |
pkpd/sim_one_comp_mm_elim_abs.stan | 0.25 | 0.26 | 1.0 | -0.42% slower |
pkpd/one_comp_mm_elim_abs.stan | 18.3 | 18.71 | 0.98 | -2.25% slower |
garch/garch.stan | 0.49 | 0.48 | 1.0 | 0.29% faster |
low_dim_gauss_mix/low_dim_gauss_mix.stan | 2.83 | 2.92 | 0.97 | -3.03% slower |
arK/arK.stan | 1.65 | 1.61 | 1.02 | 2.41% faster |
gp_pois_regr/gp_pois_regr.stan | 2.63 | 2.5 | 1.05 | 4.98% faster |
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan | 9.31 | 9.1 | 1.02 | 2.28% faster |
performance.compilation | 175.59 | 183.81 | 0.96 | -4.68% slower |
Mean result: 1.0054296420873023
Jenkins Console Log Blue Ocean Commit hash: b62657db8079bb06c39c70bb82d88755522d5b74
Summary
Collection of updates/fixes to headers and tests to address issues with ARM64, primarily small floating-point issues. Key changes:
-ffp-contract=off
flag to avoid issues due to floating-point contractionrsqrt
was returningnan
forinf
inputs (instead of 0)test_ad.hpp
wheredouble
arguments were being cast toint
caused unexpected behaviourTests
N/A
Side Effects
N/A
Release notes
Fixes for several small floating-point accuracy issues with ARM64 platforms
Checklist
[x] Copyright holder: Andrew Johnson
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