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

Flatten /prim and finish flatten #1606

Merged
merged 35 commits into from
Jan 12, 2020
Merged

Flatten /prim and finish flatten #1606

merged 35 commits into from
Jan 12, 2020

Conversation

rok-cesnovar
Copy link
Member

@rok-cesnovar rok-cesnovar commented Jan 10, 2020

Summary

Final PR in the flatten of arr, mat, scal. This PR flattens the rest of /prim and removes the checks that checked for arr, scal, mat include order.

Tests

/

Checklist

By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

rok-cesnovar and others added 26 commits January 9, 2020 17:55
…-prim

# Conflicts:
#	stan/math/prim.hpp
#	test/unit/math/fwd/core/std_numeric_limits_test.cpp
#	test/unit/math/mix/fun/ldexp_test.cpp
#	test/unit/math/opencl/kernel_generator/unary_function_cl_test.cpp
#	test/unit/math/opencl/matrix_cl_test.cpp
#	test/unit/math/opencl/prim/divide_columns_test.cpp
#	test/unit/math/opencl/rev/sub_block_test.cpp
#	test/unit/math/opencl/sub_block_test.cpp
#	test/unit/math/prim/err/is_matching_size_test.cpp
#	test/unit/math/prim/fun/F32_test.cpp
#	test/unit/math/prim/fun/array_builder_test.cpp
#	test/unit/math/prim/fun/autocorrelation_test.cpp
#	test/unit/math/prim/fun/autocovariance_test.cpp
#	test/unit/math/prim/fun/cov_exp_quad_test.cpp
#	test/unit/math/prim/fun/divide_columns_test.cpp
#	test/unit/math/prim/fun/gp_exponential_cov_test.cpp
#	test/unit/math/prim/fun/gp_matern32_cov_test.cpp
#	test/unit/math/prim/fun/gp_matern52_cov_test.cpp
#	test/unit/math/prim/fun/gp_periodic_cov_test.cpp
#	test/unit/math/prim/fun/grad_F32_test.cpp
#	test/unit/math/prim/fun/grad_reg_inc_gamma_test.cpp
#	test/unit/math/prim/fun/grad_reg_lower_inc_gamma_test.cpp
#	test/unit/math/prim/fun/log_inv_logit_diff_test.cpp
#	test/unit/math/prim/fun/log_sum_exp_test.cpp
#	test/unit/math/prim/fun/matrix_exp_2x2_test.cpp
#	test/unit/math/prim/fun/matrix_exp_action_handler_test.cpp
#	test/unit/math/prim/fun/matrix_exp_multiply_test.cpp
#	test/unit/math/prim/fun/matrix_exp_pade_test.cpp
#	test/unit/math/prim/fun/promote_elements_test.cpp
#	test/unit/math/prim/fun/promote_scalar_test.cpp
#	test/unit/math/prim/fun/promote_scalar_type_test.cpp
#	test/unit/math/prim/fun/scale_matrix_exp_multiply_test.cpp
#	test/unit/math/prim/fun/sqrt_test.cpp
#	test/unit/math/prim/fun/value_of_rec_test.cpp
#	test/unit/math/prim/fun/value_of_test.cpp
#	test/unit/math/prim/meta/is_eigen_test.cpp
#	test/unit/math/prim/meta/is_std_vector_test.cpp
#	test/unit/math/prim/meta/seq_view_test.cpp
#	test/unit/math/prim/prob/dirichlet_log_test.cpp
#	test/unit/math/rev/core/var_test.cpp
#	test/unit/math/rev/prob/bernoulli_logit_glm_lpmf_test.cpp
#	test/unit/math/rev/prob/categorical_logit_glm_lpmf_test.cpp
#	test/unit/math/rev/prob/neg_binomial_2_log_glm_lpmf_test.cpp
#	test/unit/math/rev/prob/normal_id_glm_lpdf_test.cpp
#	test/unit/math/rev/prob/poisson_log_glm_lpmf_test.cpp
# Conflicts:
#	stan/math/fwd/fun/log_sum_exp.hpp
#	stan/math/fwd/fun/unit_vector_constrain.hpp
#	stan/math/opencl/prim/bernoulli_logit_glm_lpmf.hpp
#	stan/math/opencl/prim/categorical_logit_glm_lpmf.hpp
#	stan/math/opencl/prim/neg_binomial_2_log_glm_lpmf.hpp
#	stan/math/opencl/prim/normal_id_glm_lpdf.hpp
#	stan/math/opencl/prim/ordered_logistic_glm_lpmf.hpp
#	stan/math/opencl/prim/poisson_log_glm_lpmf.hpp
#	stan/math/prim/arr.hpp
#	stan/math/prim/arr/fun/common_type.hpp
#	stan/math/prim/arr/fun/fill.hpp
#	stan/math/prim/arr/fun/log_sum_exp.hpp
#	stan/math/prim/arr/fun/promote_elements.hpp
#	stan/math/prim/arr/fun/promote_scalar.hpp
#	stan/math/prim/arr/fun/value_of.hpp
#	stan/math/prim/arr/fun/value_of_rec.hpp
#	stan/math/prim/err/check_symmetric.hpp
#	stan/math/prim/err/check_unit_vector.hpp
#	stan/math/prim/fun/LDLT_factor.hpp
#	stan/math/prim/fun/Phi.hpp
#	stan/math/prim/fun/Phi_approx.hpp
#	stan/math/prim/fun/acosh.hpp
#	stan/math/prim/fun/atanh.hpp
#	stan/math/prim/fun/chol2inv.hpp
#	stan/math/prim/fun/cholesky_corr_constrain.hpp
#	stan/math/prim/fun/cholesky_corr_free.hpp
#	stan/math/prim/fun/corr_matrix_constrain.hpp
#	stan/math/prim/fun/cov_matrix_constrain.hpp
#	stan/math/prim/fun/cov_matrix_constrain_lkj.hpp
#	stan/math/prim/fun/digamma.hpp
#	stan/math/prim/fun/distance.hpp
#	stan/math/prim/fun/divide_columns.hpp
#	stan/math/prim/fun/factor_U.hpp
#	stan/math/prim/fun/gp_dot_prod_cov.hpp
#	stan/math/prim/fun/gp_exp_quad_cov.hpp
#	stan/math/prim/fun/gp_periodic_cov.hpp
#	stan/math/prim/fun/inv_Phi.hpp
#	stan/math/prim/fun/inv_logit.hpp
#	stan/math/prim/fun/inv_sqrt.hpp
#	stan/math/prim/fun/inv_square.hpp
#	stan/math/prim/fun/lgamma.hpp
#	stan/math/prim/fun/log1m.hpp
#	stan/math/prim/fun/log1m_exp.hpp
#	stan/math/prim/fun/log1m_inv_logit.hpp
#	stan/math/prim/fun/log1p.hpp
#	stan/math/prim/fun/log1p_exp.hpp
#	stan/math/prim/fun/log2.hpp
#	stan/math/prim/fun/log_inv_logit.hpp
#	stan/math/prim/fun/log_mix.hpp
#	stan/math/prim/fun/log_sum_exp.hpp
#	stan/math/prim/fun/matrix_exp_2x2.hpp
#	stan/math/prim/fun/max.hpp
#	stan/math/prim/fun/min.hpp
#	stan/math/prim/fun/multiply_lower_tri_self_transpose.hpp
#	stan/math/prim/fun/read_corr_L.hpp
#	stan/math/prim/fun/read_cov_L.hpp
#	stan/math/prim/fun/sd.hpp
#	stan/math/prim/fun/simplex_constrain.hpp
#	stan/math/prim/fun/simplex_free.hpp
#	stan/math/prim/fun/squared_distance.hpp
#	stan/math/prim/fun/tgamma.hpp
#	stan/math/prim/fun/trigamma.hpp
#	stan/math/prim/functor/finite_diff_gradient_auto.hpp
#	stan/math/prim/mat/fun/Phi.hpp
#	stan/math/prim/mat/fun/Phi_approx.hpp
#	stan/math/prim/mat/fun/acosh.hpp
#	stan/math/prim/mat/fun/asinh.hpp
#	stan/math/prim/mat/fun/atanh.hpp
#	stan/math/prim/mat/fun/cbrt.hpp
#	stan/math/prim/mat/fun/digamma.hpp
#	stan/math/prim/mat/fun/erf.hpp
#	stan/math/prim/mat/fun/erfc.hpp
#	stan/math/prim/mat/fun/exp.hpp
#	stan/math/prim/mat/fun/exp2.hpp
#	stan/math/prim/mat/fun/expm1.hpp
#	stan/math/prim/mat/fun/inv.hpp
#	stan/math/prim/mat/fun/inv_Phi.hpp
#	stan/math/prim/mat/fun/inv_cloglog.hpp
#	stan/math/prim/mat/fun/inv_logit.hpp
#	stan/math/prim/mat/fun/inv_sqrt.hpp
#	stan/math/prim/mat/fun/inv_square.hpp
#	stan/math/prim/mat/fun/lgamma.hpp
#	stan/math/prim/mat/fun/log.hpp
#	stan/math/prim/mat/fun/log1m.hpp
#	stan/math/prim/mat/fun/log1m_exp.hpp
#	stan/math/prim/mat/fun/log1m_inv_logit.hpp
#	stan/math/prim/mat/fun/log1p.hpp
#	stan/math/prim/mat/fun/log1p_exp.hpp
#	stan/math/prim/mat/fun/log2.hpp
#	stan/math/prim/mat/fun/log_inv_logit.hpp
#	stan/math/prim/mat/fun/log_mix.hpp
#	stan/math/prim/mat/fun/log_sum_exp.hpp
#	stan/math/prim/mat/fun/logit.hpp
#	stan/math/prim/mat/fun/promote_scalar.hpp
#	stan/math/prim/mat/fun/round.hpp
#	stan/math/prim/mat/fun/square.hpp
#	stan/math/prim/mat/fun/squared_distance.hpp
#	stan/math/prim/mat/fun/tgamma.hpp
#	stan/math/prim/mat/fun/trigamma.hpp
#	stan/math/prim/mat/fun/trunc.hpp
#	stan/math/prim/mat/fun/value_of.hpp
#	stan/math/prim/mat/fun/value_of_rec.hpp
#	stan/math/prim/prob/bernoulli_logit_glm_lpmf.hpp
#	stan/math/prim/prob/bernoulli_logit_glm_rng.hpp
#	stan/math/prim/prob/gaussian_dlm_obs_lpdf.hpp
#	stan/math/prim/prob/inv_wishart_lpdf.hpp
#	stan/math/prim/prob/lkj_corr_lpdf.hpp
#	stan/math/prim/prob/matrix_normal_prec_lpdf.hpp
#	stan/math/prim/prob/multi_gp_cholesky_lpdf.hpp
#	stan/math/prim/prob/multi_gp_lpdf.hpp
#	stan/math/prim/prob/multi_normal_cholesky_lpdf.hpp
#	stan/math/prim/prob/multi_normal_lpdf.hpp
#	stan/math/prim/prob/multi_normal_prec_lpdf.hpp
#	stan/math/prim/prob/neg_binomial_2_log_glm_lpmf.hpp
#	stan/math/prim/prob/normal_id_glm_lpdf.hpp
#	stan/math/prim/prob/ordered_logistic_glm_lpmf.hpp
#	stan/math/prim/prob/ordered_logistic_lpmf.hpp
#	stan/math/prim/prob/ordered_probit_lpmf.hpp
#	stan/math/prim/prob/poisson_log_glm_lpmf.hpp
#	stan/math/prim/prob/wishart_lpdf.hpp
#	stan/math/prim/scal.hpp
#	stan/math/rev/fun/cov_exp_quad.hpp
#	stan/math/rev/fun/dot_product.hpp
#	stan/math/rev/fun/dot_self.hpp
#	stan/math/rev/fun/gp_exp_quad_cov.hpp
#	stan/math/rev/fun/gp_periodic_cov.hpp
#	stan/math/rev/fun/log_sum_exp.hpp
#	stan/math/rev/fun/sd.hpp
#	stan/math/rev/fun/simplex_constrain.hpp
#	stan/math/rev/fun/squared_distance.hpp
#	stan/math/rev/functor/adj_jac_apply.hpp
# Conflicts:
#	stan/math/prim/prob/exp_mod_normal_cdf.hpp
#	stan/math/prim/prob/exp_mod_normal_lccdf.hpp
#	stan/math/prim/prob/exp_mod_normal_lcdf.hpp
#	stan/math/prim/prob/exp_mod_normal_lpdf.hpp
@mcol
Copy link
Contributor

mcol commented Jan 10, 2020

What's the timeline for this? Is it waiting for the freeze first or do we need to push it before it?

@rok-cesnovar
Copy link
Member Author

We havent really discussed it. The freeze will start on the 11th (not sure what time, we usually take midnight anywhere on earth- https://www.worldtimeserver.com/time-zones/aoe/ or smth like that).

But I am not sure whether to merge this during the freeze or not. Its technically not a bugfix but its not a new feature either. It is a huge PR and once again the review will take some time.

Personally I do want to get this in before the next release so that we release the library in a clean state. I dont wont to force it tho.

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 4.87 4.85 1.0 0.49% faster
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.97 -3.43% slower
eight_schools/eight_schools.stan 0.09 0.1 0.95 -5.04% slower
gp_regr/gp_regr.stan 0.22 0.22 1.01 1.22% faster
irt_2pl/irt_2pl.stan 6.07 6.06 1.0 0.17% faster
performance.compilation 87.82 86.95 1.01 0.99% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 7.35 7.33 1.0 0.25% faster
pkpd/one_comp_mm_elim_abs.stan 21.96 20.15 1.09 8.28% faster
sir/sir.stan 99.4 95.72 1.04 3.69% faster
gp_regr/gen_gp_data.stan 0.04 0.05 0.98 -1.65% slower
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.96 2.95 1.0 0.12% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.35 0.32 1.12 10.64% faster
arK/arK.stan 2.43 2.41 1.01 0.51% faster
arma/arma.stan 0.79 0.79 1.0 0.08% faster
garch/garch.stan 0.52 0.6 0.88 -13.45% slower
Mean result: 1.00469648573

Jenkins Console Log
[Blue Ocean](https://jenkins.mc-stan.org/blue/organizations/jenkins/Math Pipeline/detail/PR-1606/894/pipeline)
Commit hash: 54da5ef9c758cf064c28b349b8a0256b7712e232


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 4.88 4.96 0.98 -1.69% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.96 -4.47% slower
eight_schools/eight_schools.stan 0.09 0.1 0.98 -2.5% slower
gp_regr/gp_regr.stan 0.22 0.22 1.0 0.11% faster
irt_2pl/irt_2pl.stan 6.08 6.09 1.0 -0.17% slower
performance.compilation 89.07 86.71 1.03 2.66% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 7.32 7.32 1.0 -0.05% slower
pkpd/one_comp_mm_elim_abs.stan 21.87 21.16 1.03 3.24% faster
sir/sir.stan 98.48 96.28 1.02 2.24% faster
gp_regr/gen_gp_data.stan 0.05 0.05 1.03 2.79% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.95 2.96 1.0 -0.18% slower
pkpd/sim_one_comp_mm_elim_abs.stan 0.32 0.32 1.0 -0.5% slower
arK/arK.stan 2.43 2.42 1.0 0.21% faster
arma/arma.stan 0.79 0.79 1.0 -0.08% slower
garch/garch.stan 0.52 0.59 0.88 -13.8% slower
Mean result: 0.993394740091

Jenkins Console Log
[Blue Ocean](https://jenkins.mc-stan.org/blue/organizations/jenkins/Math Pipeline/detail/PR-1606/895/pipeline)
Commit hash: 54da5ef9c758cf064c28b349b8a0256b7712e232


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@mcol
Copy link
Contributor

mcol commented Jan 11, 2020

I would also like to see it make it, but given the size and impact on other PRs it would be more convenient to know that it could go in just after the freeze. @seantalts would that be possible?

In any case, I'm starting reviewing it now, let's see how far we can get.

@rok-cesnovar
Copy link
Member Author

Thanks Marco!

Copy link
Contributor

@mcol mcol left a comment

Choose a reason for hiding this comment

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

That's the first half. Usual bunch of nitpicks, but also 2-3 cases in which a header included itself.

stan/math/fwd/fun/crossprod.hpp Outdated Show resolved Hide resolved
stan/math/fwd/fun/expm1.hpp Outdated Show resolved Hide resolved
stan/math/fwd/fun/value_of_rec.hpp Outdated Show resolved Hide resolved
stan/math/mix/functor/finite_diff_grad_hessian_auto.hpp Outdated Show resolved Hide resolved
stan/math/opencl/copy.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/log2.hpp Show resolved Hide resolved
stan/math/prim/fun/log_inv_logit.hpp Show resolved Hide resolved
stan/math/prim/fun/mdivide_right_ldlt.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/mdivide_right_spd.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/mdivide_right_tri.hpp Outdated Show resolved Hide resolved
# Conflicts:
#	stan/math/rev/fun/LDLT_alloc.hpp
#	stan/math/rev/fun/columns_dot_self.hpp
#	stan/math/rev/fun/divide.hpp
#	stan/math/rev/fun/dot_product.hpp
#	stan/math/rev/fun/dot_self.hpp
#	stan/math/rev/fun/gp_exp_quad_cov.hpp
#	stan/math/rev/fun/gp_periodic_cov.hpp
#	stan/math/rev/fun/initialize_variable.hpp
#	stan/math/rev/fun/log_determinant_ldlt.hpp
#	stan/math/rev/fun/log_determinant_spd.hpp
#	stan/math/rev/fun/matrix_exp_multiply.hpp
#	stan/math/rev/fun/matrix_power.hpp
#	stan/math/rev/fun/mdivide_left_ldlt.hpp
#	stan/math/rev/fun/mdivide_left_spd.hpp
#	stan/math/rev/fun/mdivide_left_tri.hpp
#	stan/math/rev/fun/multiply.hpp
#	stan/math/rev/fun/sd.hpp
#	stan/math/rev/fun/tcrossprod.hpp
#	stan/math/rev/fun/trace_inv_quad_form_ldlt.hpp
#	stan/math/rev/fun/unit_vector_constrain.hpp
#	stan/math/rev/fun/variance.hpp
#	stan/math/rev/functor/adj_jac_apply.hpp
#	stan/math/rev/functor/algebra_solver_fp.hpp
#	stan/math/rev/functor/algebra_solver_newton.hpp
#	stan/math/rev/functor/algebra_system.hpp
#	stan/math/rev/functor/idas_forward_system.hpp
#	stan/math/rev/functor/idas_system.hpp
#	stan/math/rev/functor/integrate_1d.hpp
#	stan/math/rev/functor/kinsol_data.hpp
#	stan/math/rev/functor/kinsol_solve.hpp
# Conflicts:
#	stan/math/prim/prob/double_exponential_lccdf.hpp
#	stan/math/prim/prob/double_exponential_lcdf.hpp
#	stan/math/prim/prob/double_exponential_lpdf.hpp
@rok-cesnovar
Copy link
Member Author

I addressed all comments in the first batch.

I would definitely wait for at least #1558 to get merged before merging this one. The rest are currently either not ready yet or I would consider as bugfix PRs.

Copy link
Contributor

@mcol mcol left a comment

Choose a reason for hiding this comment

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

Still a bit to do, but it should be quite quick.

stan/math/prim/fun/sinh.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/sort_indices_asc.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/sort_indices_desc.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/tan.hpp Outdated Show resolved Hide resolved
stan/math/prim/fun/tanh.hpp Show resolved Hide resolved
stan/math/prim/prob/neg_binomial_cdf.hpp Show resolved Hide resolved
stan/math/prim/prob/wiener_lpdf.hpp Show resolved Hide resolved
stan/math/rev/core/operator_unary_plus.hpp Outdated Show resolved Hide resolved
stan/math/rev/fun/Eigen_NumTraits.hpp Show resolved Hide resolved
@bob-carpenter
Copy link
Contributor

#1525 is another big one waiting to be merged but that's probably not going to be ready to go for next PR (isn't code freeze today the 11th?).

Copy link
Contributor

@mcol mcol left a comment

Choose a reason for hiding this comment

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

Got to the end! Only reordering stuff here.

Also to fix is the header guard for inverse_softmax.hpp, and not strictly for this PR the header guard for stan/math/mix/fun/typedefs.hpp could be fixed too.

stan/math/rev/fun/acosh.hpp Show resolved Hide resolved
stan/math/rev/fun/asinh.hpp Show resolved Hide resolved
stan/math/rev/fun/atanh.hpp Show resolved Hide resolved
stan/math/rev/fun/cbrt.hpp Show resolved Hide resolved
stan/math/rev/fun/determinant.hpp Outdated Show resolved Hide resolved
stan/math/rev/fun/value_of_rec.hpp Show resolved Hide resolved
stan/math/rev/functor/coupled_ode_system.hpp Show resolved Hide resolved
stan/math/rev/functor/gradient.hpp Show resolved Hide resolved
stan/math/rev/functor/jacobian.hpp Show resolved Hide resolved
stan/math/rev/functor/map_rect_reduce.hpp Show resolved Hide resolved
@rok-cesnovar
Copy link
Member Author

#1525 is another big one waiting to be merged but that's probably not going to be ready to go for next

I was assuming it wont be ready, but yeah I am happ to wait for that PR too, if needed.

(isn't code freeze today the 11th?).

Yes, 11th anywhere on the earth. If this gets approved today I will merge it once the deadline passes.

Copy link
Contributor

@mcol mcol left a comment

Choose a reason for hiding this comment

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

Approved! All seems in good state, hopefully test will pass and we can finally move to new things! :)
@rok-cesnovar you've done an astounding job through all these PRs, I can't imagine the amount of effort it took to handle such an invasive change and making into reviewable pieces with very minimal disruption to other devs. The simplified codebase will definitely be a much more pleasant place to work on, and we won't miss the old layout!

@seantalts
Copy link
Member

Agreed, thanks Rok! and thanks @mcol for stepping up to review :)

@stan-buildbot
Copy link
Contributor


Name Old Result New Result Ratio Performance change( 1 - new / old )
gp_pois_regr/gp_pois_regr.stan 4.87 4.94 0.99 -1.34% slower
low_dim_corr_gauss/low_dim_corr_gauss.stan 0.02 0.02 0.99 -1.09% slower
eight_schools/eight_schools.stan 0.09 0.09 1.05 4.64% faster
gp_regr/gp_regr.stan 0.22 0.22 0.98 -1.62% slower
irt_2pl/irt_2pl.stan 6.06 6.08 1.0 -0.32% slower
performance.compilation 87.62 86.68 1.01 1.07% faster
low_dim_gauss_mix_collapse/low_dim_gauss_mix_collapse.stan 7.34 7.35 1.0 -0.16% slower
pkpd/one_comp_mm_elim_abs.stan 20.4 21.07 0.97 -3.27% slower
sir/sir.stan 102.98 104.07 0.99 -1.06% slower
gp_regr/gen_gp_data.stan 0.04 0.04 1.01 0.62% faster
low_dim_gauss_mix/low_dim_gauss_mix.stan 2.97 2.96 1.0 0.18% faster
pkpd/sim_one_comp_mm_elim_abs.stan 0.31 0.31 1.0 0.05% faster
arK/arK.stan 1.77 1.76 1.01 0.69% faster
arma/arma.stan 0.83 0.79 1.06 5.46% faster
garch/garch.stan 0.59 0.59 1.01 1.05% faster
Mean result: 1.00376380382

Jenkins Console Log
[Blue Ocean](https://jenkins.mc-stan.org/blue/organizations/jenkins/Math Pipeline/detail/PR-1606/898/pipeline)
Commit hash: 54da5ef9c758cf064c28b349b8a0256b7712e232


Machine information ProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010

CPU:
Intel(R) Xeon(R) CPU E5-1680 v2 @ 3.00GHz

G++:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

Clang:
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.6.0
Thread model: posix

@rok-cesnovar rok-cesnovar merged commit 47b0595 into develop Jan 12, 2020
@rok-cesnovar
Copy link
Member Author

Thanks Marco for all the reviews. You really made this process as smooth as it could have been.

@rok-cesnovar rok-cesnovar deleted the flatten-prim branch January 12, 2020 11:04
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.

Flatten scal / arr / mat
5 participants