Skip to content

Releases: stan-dev/stanc3

v2.26.0 (26 January 2021)

27 Jan 02:49
Compare
Choose a tag to compare
release/v2.26.0

v2.26.0-rc1

20 Jan 11:55
f22db2d
Compare
Choose a tag to compare
v2.26.0-rc1 Pre-release
Pre-release
Tagging v2.26.0-rc1

v2.25.0 (26 October 2020)

26 Oct 13:03
Compare
Choose a tag to compare
  • Improved parser error message on missing semicolon in the data or parameters block.
  • Expanded OpenCL (GPU) support for GLMs to now handle parameters for any argument.
  • Fix parameter unconstraining bug when the constraints depend on other constrained parameters.
  • "offset, "multiplier," "lower," and "upper" are no longer reserved keywords and can be used in the names of identifiers.
  • Extended elt_multiply (.*) and elt_divide (./) to cases where both inputs are scalars.
  • Added support for unnormalized distributions for the target += sytnax.
  • Changed the MIR to represent function declarations as Options.
  • Variable names are now allowed that shadow math function names.
  • Fixed a bug with not recognizing transformed parameters in pedantic mode
  • Added vectorised binary functions:
    • bessel_first_kind
    • beta
    • binary_log_loss
    • binomial_coefficient_log
    • choose
    • falling_factorial
    • fdim
    • fmax
    • fmin
    • fmod
    • gamma_p
    • gamma_q
    • hypot
    • lbeta
    • ldexp
    • lmgamma
    • log_diff_exp
    • log_falling_factorial
    • log_inv_logit_diff
    • log_modified_bessel_first_kind
    • log_rising_factorial
    • modified_bessel_first_kind
    • modified_bessel_second_kind
    • lmultiply
    • multiply_log
    • owens_t
    • rising_factorial

Code contributions were made by @andrjohns @nhuurre @rok-cesnovar @rybern and @seantalts

v2.25.0-rc1 ( 14 October 2020 )

14 Oct 20:55
4de2491
Compare
Choose a tag to compare
Pre-release
Merge pull request #717 from rybern/fix-nix

Small Nix installation fix

v2.24.1 (11 August 2020)

11 Aug 14:15
16bb25b
Compare
Choose a tag to compare

Bugfixes

  • added using std::pow to generated code

  • fixed code generation for pow()

  • added data quantifier to linspaced_* signatures

  • fixed code generation for empty matrices

v2.24.0 (28 July 2020)

28 Jul 11:50
Compare
Choose a tag to compare

Cmdstan updated to 2.24.0 (release notes)

New functions:
algebra_solver_newton

matrix hmm_hidden_state_prob(matrix, matrix, vector)
int[] hmm_latent_rng(matrix, matrix, vector)
real hmm_marginal(matrix, matrix, vector)

T lambert_w0(T), for any T
T lambert_w1(T), for any T

matrix matrix_power(matrix, int)

real multinomial_logit_log(int[], vector)
real multinomial_logit_lpmf(int[], vector)
int[] multinomial_logit_rng(vector, int)

ode_adams, ode_adams_tol
ode_bdf, ode_bdf_tol
ode_rk45, ode_rk45_tol

T pow(int, T)
T pow(real, T)
T pow(T, int)
T pow(T, real)
(previously only real pow(real, real) was available)

T reverse(T), where T is vector, row_vector or an array of any type

matrix identity_matrix(int)
real[] linspaced_array(int, real, real); row_vector linspaced_row_vector(int, real, real); vector linspaced_vector(int, real, real)
int[] one_hot_int_array(int, int); real[] one_hot_array(int, int); row_vector one_hot_row_vector(int, int); vector one_hot_vector(int, int)
int[] ones_int_array(int); real[] ones_array(int); row_vector ones_row_vector(int); vector ones_vector(int)
vector uniform_simplex(int)
int[] zeros_int_array(int); real[] zeros_array(int); row_vector zeros_row_vector(int); vector zeros_vector(int)

New features:

  • pedantic mode
  • experimental optimization mode
  • new integer division operator %/%
  • non-scalar values are now allowed in lower, upper, offset and multiplier
  • integrate_ode_* functions are now deprecated
  • data-only restricted functions now work with parameters in generated quantities
  • improved out-of-bounds messages for vectors, matrices
  • added checks for invalid literals
  • --allow_undefined and --include_paths are deprecated in favor of --allow-undefined and --include-paths
  • cleaned up the generated model C++ code: model is now final, using statements instead of typedef, better use of inline, use of .clear() instead of .resize(0), remove unnecessary functions
  • cleaned up the OCaml code: better use of helper functions, removed duplicate functions, better exception messages, replace imperative code for handling Stan Math signatures
  • size expressions for parameters and generated quantities are now only evaluated once
  • better handle model names that are not C++ friendly (start with numbers, have non-alphanumeric characters)

Bugfixes:

  • changed the loop index type to int to prevent issues when using it in expressions with signed numbers
  • integer arrays now initialize to the smallest representable integer
  • var arrays initialize with a prebuilt dummy var, to not creat new varis
  • all map_rect calls are registered when using MPI
  • _lpdf/_lpmf functions are now used instead of *_log when generating code for the tilde statements
  • single argument distribution do not require the vertical bar anymore (e.g. std_normal_lpdf(x|))
  • fixed a bug that caused tilde statements to conflict with userdef functions
  • rng functions are no longer allowed in size declarations
  • fixed the _lpdf functor struct so that UDF with _log and int argument now compile
  • fixed array literal type-checking
  • fixed the error messages for missing input (line number is now displayed properly)
  • fixed indexing in transform_init()
  • fixed emitting generated quantities only (for gq_writer)
  • fixed debug data generator for constrained matrix types and added array value bounds
    © 2020 GitHub, Inc.

v2.23.0: Merge pull request #510 from stan-dev/bugfix/issue-497-offset-multiplier

22 Apr 21:10
f556d0d
Compare
Choose a tag to compare
Fix the offset without multiplier or multiplier without offset bug

v2.22.1: Merge pull request #444 from stan-dev/stanc3-version

01 Feb 00:42
11a0fa5
Compare
Choose a tag to compare

v2.22.0: Merge pull request #439 from stan-dev/use-new-stanc2-flag

22 Jan 01:50
acfb461
Compare
Choose a tag to compare
Use new STANC2=true flag in CmdStan instead of old performance-tests-cmdstan branch

v1.0.0-rc3

18 Sep 13:26
Compare
Choose a tag to compare
v1.0.0-rc3 Pre-release
Pre-release

At this point we're pretty confident we're replicating Stan 2 behavior. If you find anything that doesn't line up or make sense please file an issue or send Sean an email!

Instructions:

Trying it with CmdStan can be as simple as:

  1. git clone --recursive https://github.com/stan-dev/cmdstan; cd cmdstan
  2. make -j4 build
  3. Download the stanc3 binary for your OS to the right place:
  • Linux: curl -L https://github.com/stan-dev/stanc3/releases/download/v1.0.0-rc1/linux-stanc -o bin/stanc
  • Mac: curl -L https://github.com/stan-dev/stanc3/releases/download/v1.0.0-rc1/mac-stanc -o bin/stanc
  • Windows: curl -L https://github.com/stan-dev/stanc3/releases/download/v1.0.0-rc1/windows-stanc -o bin\stanc
  1. make <path/to/model.stan>

If you'd like to go the extra mile and help us check that it also gets the same results as your models, if you have them in the same folder as a .data.R file with the same name, you can use the performance-tests-cmdstan repo to compare compilers:

  1. git clone --recursive https://github.com/stan-dev/performance-tests-cmdstan; cd performance-tests-cmdstan
  2. Download the binary as above and remember its location.
  3. bash compare-compilers.sh "<path/to/models/dir> --num_samples=10" <path/to/stanc3/from/step/2>

Thanks all!